Configuration and project layout
Spring Concepts / Detailed guide
src/main/java contains compiled Java source. src/main/resources contains templates, static assets, and configuration that are copied into the JAR. src/test/java contains tests. target is generated output. pom.xml defines coordinates, dependencies, Java baseline, and plugins.
application.properties separates deployment choices from source. server.port selects the HTTP port. spring.mongodb.uri reads the driver URI; spring.mongodb.database selects the application database. ${MONGODB_URI} is a property placeholder resolved from the environment. Never substitute an actual password into the checked-in file.
When starting from an IDE, configure MONGODB_URI in its run configuration. Variables set in one terminal do not automatically appear inside an already-running IDE. Restarting or changing the IDE launch environment may be necessary.