Releases: Francis0121/Backend
Releases · Francis0121/Backend
Implement Controller Layer
1. Add Mockito Library
Available @Mock, @InjectMock Annotation
These annotation help to Junit mock Test
2. Implement Service Layer
Low service layer is connect to database and controller.
Controller class implement all validation and logical statement.
Service layer implement insert database entity object.
3. Maven Deploy package setting
Clean and War directory setting.
4. Category Implement ( ing )
@zerocool530 Implement Category
5. Available Hibernate Validator
Such as @NotNull, @Size .. Annotation.
6. Add @RestExceptionControllerAdvice
This help for handler RuntimeException
Avaliable Mybatis, Jdbc (sqlite, h2) , Jpa(h2)
1. Available Mybatis, JPA
- Jpa Library not implement sqlite. So add h2 database.
- Also Mybatis, Jdbc avaliable h2 database.
2. Add System Properties orm and database
- Add Java vm option ( ex. -Dorm=sqlite, -Ddatabase=h2 )
- These option choose orm and database category.
3. Code quality
- Not use getter, setter, constructor So add Lombok library.
- It is auto make getter, setter and etc..
- Code is very simple
- It use annotation processor at compile time.
Apply Spring Transaction Annotation
- Transcation
Enabled @transactional Annotation.
And apply AspectJ mode transactional - Logback
Spring log don't working.
Solve this problem. Add jcl-over-slf4j library.
And add groovy log setting.
Properties & Sqlite
- Set Properties
- Use @propertysource
- Available @value annotation
- Implement Sqlite Jdbc Template
- DataSource (org.tomcat)
- Use spring Jdbc Template
Add Log Library
Implement logging sytem use slf4j and logback
And use logback.groovy file. So add groovy dependency.
Init Spring Project
Implement
Project set Web Application Format.
Write RootApplicationConfig Test Case.
Add Library
- Spring Framework 4.3.0.RC1
- Junit 4.12