Category: Spring

Spring Boot CORS Cross Origin with Integration Test

Add CORS to a request mapping Add CORS to a request mapping using application properties value Change @CrossOrigin to reference the value from the application properties. Let’s assume the CORS header domain is stored in an stored as config.headers.cors= Integration test for CORS domains This tests that requests made with the correct origin domains are granted access to the...

How to structure a Spring Boot Application

General Package Structure config – class which will read from property files cache – caching mechanism class files constants – constant defined class controller – controller class exception – exception class model – pojos classes will be present security – security classes service – Impl classes util – utility classes validation – validators classes bootloader – main class References