Explore The Project
Let's explore the structure and content of your Spring Boot project for building an event ticket platform.
Project Structure
The project follows the standard Maven project structure with separate directories for source code, tests, and resources.
In the main source directory (src/main/java), we have:
- The main application class
TicketsApplication.javaunder thecom.devtiro.ticketspackage - The
@SpringBootApplicationannotation marks this as our application's entry point - The
mainmethod usesSpringApplication.run()to start our application
The resources directory (src/main/resources) contains:
application.propertiesfile for configuration settings- We've removed the unused
staticandtemplatesdirectories since we'll be using React for our frontend
Dependencies
Our pom.xml file includes key dependencies:
- Spring Boot starter dependencies for web, JPA, security, and OAuth2
- PostgreSQL for our production database
- H2 database for testing
- Lombok for reducing boilerplate code
- Testing dependencies including Spring Security Test
Configuration
The application.properties file contains settings for our application, currently only the application's name.
spring.application.name=ticketsTesting Setup
The test directory (src/test/java) mirrors the main source structure and includes:
- A basic test class that verifies our Spring context loads correctly
- H2 database configuration for testing, preventing the need for PostgreSQL during tests
Summary
- Project uses standard Maven structure with Spring Boot configuration
- Main application class serves as the entry point with Spring Boot annotations
- Key dependencies include Spring Web, JPA, Security, and PostgreSQL
- H2 database configured for testing environment