https://github.com/softeq/spring-querydsl-project-template
Ready to use project template that integrates Java 8/11 with Spring Boot 2, JPA, QueryDsl and Postgres
https://github.com/softeq/spring-querydsl-project-template
gradle java jpa-hibernate junit5 querydsl-jpa spring-boot-2 spring-test spring-web
Last synced: 8 days ago
JSON representation
Ready to use project template that integrates Java 8/11 with Spring Boot 2, JPA, QueryDsl and Postgres
- Host: GitHub
- URL: https://github.com/softeq/spring-querydsl-project-template
- Owner: Softeq
- License: mit
- Created: 2019-10-18T17:08:01.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-25T13:17:14.000Z (over 5 years ago)
- Last Synced: 2025-03-29T16:22:28.554Z (about 1 month ago)
- Topics: gradle, java, jpa-hibernate, junit5, querydsl-jpa, spring-boot-2, spring-test, spring-web
- Language: Java
- Homepage:
- Size: 97.7 KB
- Stars: 5
- Watchers: 4
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
## Spring QueryDsl Project Template
[](https://travis-ci.org/Softeq/spring-querydsl-project-template)
[](https://coveralls.io/github/Softeq/spring-querydsl-project-template?branch=master)There are Java project template that integrates next technologies:
1. [Spring Boot 2](https://spring.io/projects/spring-boot)
2. [Spring Data JPA](https://spring.io/projects/spring-data-jpa)
3. [QueryDSL JPA](http://www.querydsl.com/)
4. [Liquibase](https://www.liquibase.org/)
5. Postgres
6. [MapStruct](https://mapstruct.org/)
7. [Lombok](https://projectlombok.org/)
8. [JUnit 5](https://junit.org/junit5/docs/current/user-guide/) + Integration Tests## Build
To build the project it is require to use next command```bash
gradlew clean build
```To build docker image it will require to use
```bash
docker build . -t app-template
```## Run
To run the project it is require to use docker-compose
```bash
docker-compose -f ./docker/docker-compose.yaml up
```To run only project dependencies it is require to evaluate
```bash
docker-compose -f ./docker/docker-compose-deps.yaml up
```## Architecture
Application provide next folder structure
```
src
/itest
/main
/test
```Application provides next folders:
- *itest* - this folder contains integration tests
- *main* - this folder contains application code
- *test* - this folder contains JUnit 5 testsMain application contains folder structure that represent
([hexagonal architecture](https://en.wikipedia.org/wiki/Hexagonal_architecture_(software)))```
com.softeq.app
.domain
.services
.config
.adapters
.api
.jpa
```There are list of packages:
- *domain* - this folder contains domain model of the application and repository interfaces
- *services* - this folder contains services of the application
- *config* - current folder contains application configurations
- *adapters* - current folder contains external services adapters
Project contains several base classes:
1. *AbstractITest* - base integration test that configure context and rollback options for the tests
2. *AbstractRepositoryImpl* - base class for queryDsl based repositoriesGradle build support next options:
1. `-PdisableIntegrationTests` - this option allow to disable integration tests
2. `-PdisableJacoco` - this options allow to disable code coverage checks**To build the code successfully it is required > 80% code coverage!**
This requirement automatically checked during build by JaCoCo plugin.## License
MIT