Write to about Spring Boot best practice architecture.
Git clone
git clone https://github.com/tomo0111/springboot-bestpractice.git
Run test
./gradlew test
Docker image build
- Build SpringBoot best practice application.
- Use docker for local development.
- MySQL
- Redis
- OpenJDK
docker-compose -f docker-compose-local.yml build
Run container
docker-compose -f docker-compose-local.yml up -d
set target
fly -t tomohito login -c http://www.concourse.developer-tm.com:8080
all delete target
fly logout -a
Local development property file is application-loc.yml.
Working on docker container.
- Docker Image
- MySQL
- Redis
- OpenJDK
Cassandra cluster.
- CentOS7 virtual machine
- 3 nodes
Sample query is sql/mysql_sample.sql file.
Sample Class
- UserEntity.java
- UserService.java
- UserRepository.java
- InfoEntity.java
- InfoService.java
- InfoRepository.java
Sample Class
- UserService
Sample Class
Develop development property file is application-dev.yml.
Working on Heroku
- Gradle build pack
- Postgres SQL
Spring security.
JWT.
spring-boot-bestpracite
├── main
│ ├── java
│ │ └── com
│ │ └── bestpractice
│ │ └── api
│ │ ├── App.java
│ │ ├── common
│ │ │ ├── config
│ │ │ ├── filter
│ │ │ ├── property
│ │ │ └── util
│ │ │
│ │ ├── controller
│ │ │ ├── Advice.java
│ │ │ ├── v1
│ │ │ └── v2
│ │ │
│ │ ├── domain
│ │ │ ├── entity
│ │ │ ├── model
│ │ │ ├── repository
│ │ │ └── role
│ │ │
│ │ ├── exception
│ │ │
│ │ └── service
│ │
│ └── resources
│ ├── application-dev.yml
│ └── application-local.yml
└── test
├── java
│ └── com
│ └── bestpractice
│ └── api
│ ├── AppTests.java
│ │
│ ├── common
│ │
│ ├── controller
│ │
│ ├── repository
│ │
│ └── service
│
└── resources
└── application-test.yml