List of Technologies and Principles for Developing an Insurance Application
ALL TOOLS MUST BE THE LATEST STABLE VERSION!
- Java 21
- Spring Boot
- Spring Web (Spring MVC)
- Spring Data JPA
- Spring Security
- Hibernate ORM
- Lombok
- Gradle
- PostgreSQL/H2
- Liquibase
- IntelliJ IDEA
- Postman
- Junit
- Mockito
- Google java code format
- Monolith Architecture
- SOLID, DRY, KISS
- RESTful API
The code style settings should be automatically detected if you open the most recent version of the project. To verify that the appropriate code style is used you can do the following:
Go to File -> Settings ->
Navigate to Editor -> Code Style > Java. ->
Ensure GoogleStyle is selected in the Scheme dropdown.
Open your web browser and navigate to http://localhost:8080/h2-console. Use the following settings to connect:
JDBC URL: jdbc:h2:mem:testdb
Open settings and then select Editor | Code Style | Java.
Enabled "Use single class import" option
In the "Class count to use import with ''" and "Names count to use static import with ''" fields write 999.
Step 1: Set up the development environment
- Install JDK 8 or higher
- Install IntelliJ IDEA
- Install Gradle
- Install PostgreSQL
- Install Postman
- Install Git
Step 2: Run application
- Ensure Lombok is enabled in IntelliJ IDEA
- Run InsuranceApplication.java
- Go to http://localhost:8080
poehali.lt
Run the following commands:
- "gradle build" in Git bash
- "docker-compose --profile dev up" in cmd
This command will:
Build the application Docker image.
Start the application with the development profile.
Map port 8081 on your host to port 8080 in the container to avoid port conflicts.
Access the application on http://localhost:8081
Run the following commands:
- "gradle build" in Git bash
- "docker-compose --profile prod up" in cmd
This command will:
Build the application Docker image.
Start the PostgreSQL database service.
Start the application with the production profile.
Map port 8080 on your host to port 8080 in the container.
Access the application on http://localhost:8080
Run the following command: "docker-compose down"