Anatomy of a Spring Boot Project
Find your way around a Spring Boot project, from where entities, repositories, controllers, and security settings live to how Main.java starts the app.
Spring Project Anatomy
Use these locations to find the part of your application you need to change:
| Location | Purpose |
|---|---|
pom.xml |
Spring, JPA, SQLite, security, and Thymeleaf dependencies |
src/main/java/ |
Entities, repositories, controllers, and security configuration |
src/main/resources/application.properties |
Port and database configuration |
src/main/resources/templates/ |
Thymeleaf HTML for the /mvc/* option |
src/main/resources/static/ |
Static assets served from Spring |
Main.java, annotated with @SpringBootApplication, starts the application. For this assignment, use the configured port and SQLite database from the starter project rather than copying older example settings.
Security Files
SecurityConfig.javaisOrder(1)and processes the/api/*filter chain first.MvcSecurityConfig.javaisOrder(2)and processes the/mvc/*filter chain afterward.
See Java Spring Hacks for the required endpoint and UI path.
Hacks
Start your own Spring project: Open Coding Society Spring