Create the project in IntelliJ IDEA
FoundationStart with an empty Spring Boot project made by IntelliJ IDEA itself, then set up the folders, the database and a shared page.
- Go to
File → New → Projectand choose Spring Initializr. - Set Name
seughost, Groupcom.seughost, Artifactapp, Type Maven, Language Java, Packaging Jar and JDK 25. - Pick the latest Spring Boot 4.x and add: Spring Web, Thymeleaf, Spring Data MongoDB, Spring Security, Validation, Spring Cache Abstraction, Lombok and Spring Boot DevTools.
- Click Create and wait for Maven to finish importing.
I just created an empty Spring Boot 4 project (Java 25, Maven) in IntelliJ. Organise it into the usual folders: model, dto, repository, service, controllers (web and api), exception and config.
Connect it to MongoDB Atlas. Use two databases, one for building and testing and one for the live site, so testing never touches real data. Keep the real database link out of git, and let me pick which one to use with a setting. Run it on port 9090 unless a PORT setting says otherwise.
Make a shared page layout (top bar, footer) and a simple home page that uses it. Visitors shouldn't need to log in to see the home page or the static files.
- The green Run button starts the app and the console ends with
Started SeughostApplication - The home page opens at
localhost:9090with the shared layout - Building and the live site use two different databases, and no real database link is in git