a template project for spring boot application which will have all the code structures used widely in industry
For further reference, please consider the following sections:
- Official Apache Maven documentation
- Spring Boot Maven Plugin Reference Guide
- Create an OCI image
- Spring Web
- Spring Boot DevTools
- Spring Data JPA
The following guides illustrate how to use some features concretely:
- Building a RESTful Web Service
- Serving Web Content with Spring MVC
- Building REST services with Spring
- Accessing Data with JPA
spring.main.allow-bean-definition-overriding=true
spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.url=jdbc:postgresql://localhost:5432/SpringDevDb
spring.datasource.username=postgres
spring.datasource.password=postgres
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.properties.hibernate.format_sql=true
version: "3"
services:
db:
image: postgres:11-alpine
environment:
POSTGRES_DB: test
POSTGRES_PASSWORD: Possible-3173
POSTGRES_USER: postgres
logging:
driver: "none"
restart: unless-stopped
volumes:
- db-data:/var/lib/postgresql/data
ports:
- 5432:5432
volumes:
db-data:or start from docker command line
docker run --name postgresql-container -p 5434:5434 -e POSTGRES_PASSWORD=Possible-3173 -d postgres