Skip to content

Sheepion/springboot-suitable-practice-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Springboot suitable practice demo

License: MIT

This repo is a suitable practice demo for Springboot, trying to demonstrate a good(maybe) practice of using Springboot with these libraries/artifacts:

  1. Spring Boot
  2. MyBatis for database access.
  3. Flyway for database schema migration/versioning.
  4. PostgreSQL as the database.
  5. JUnit 5 for unit testing.
  6. Testcontainers for better mapper test.
  7. MapStruct-plus for easier mapping between DTO and entity.
  8. Knife4j for better OpenAPI swagger documents.

Dependency version used

Dependency Version Remark
JDK 17
PostgreSQL 15
Springboot 3.5.4
Flyway 11.7.2 inherited from Springboot
JUnit 5.12.2 inherited from Springboot
MyBatis 3.5.19 from Mybatis-spring-boot-starter
Testcontainer 1.21.3 from spring-boot-testcontainers
MapStruct-plus 1.4.8
Knife4j 4.4.0

What you may learn from this repo

Testing

  1. Mapper test with Testcontainer
  2. Mocked test with Mockito

Design

  1. Service layer design practices

Todo list

Docs about:

  • Common class like Result.
  • File structure about springboot web application.
  • Mock test usage.

About

This repo is a **suitable** practice demo for Springboot, trying to demonstrate a good(maybe) practice of using Springboot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages