At the weekend at home research Spring-boot, referring to some of the open source projects on GitHub, a rest microservices framework, take it to the people, for the people, on GitHub open source, the address is as follows:
Https://github.com/yjmyzz/spring-boot-rest-framework
The main features are as follows:
-----------------
Data access
DAO uses MyBatis 3.3.0 + tk.mybatis generic Mapper3.1.3 to support transaction rollback
Database initialization Script
See Src/mybatis-generator/ddl.sql
Data entity code generation
Using Mybatis-generator 1.3.2 generation, generate script see src/mybatis-generator/gen.sh
Web container
Embedded Tomcat container with gzip compression turned on by default
Logging and monitoring
Parameters for all controller layers use AOP to automatically log logs,
Parameter check
Parameter objects are automatically verified by annotations
return results
The service results are returned in JSON format, and if the service layer has an exception, the results are returned with ErrorCode and Errordesc, regardless of whether the service-side method executes successfully or not, it returns the execution result and the service-side time-consuming
Access address
Http://localhost:8080/ping This is the test address, after the app launches, the Browse this address should return:
1 {2 3 "data": "Running", 4 "ErrorCode": null,5 "Errordesc": null,6 "Elapsedmilliseconds":? 0,7 " Success ": True8 9}
Other GitHub reference projects:
Rest-nettyserver
Spring-boot-samples
Mapper
Mybatis-spring-boot
Spring-boot-example
Http://www.cnblogs.com/yjmyzz/p/spring-boot-rest-framework.html
Spring-boot-based Rest microservices framework