yue-library
yue-library is a library on the basis of the package SpringBoot
- Built-in rich JDK tools
- Automatic assembling a series of basic Bean and environment configuration item
- SpringCloud quickly build project, so that micro-services easier
This is based on the second major version of the updated JDK11, brings a wealth of new features and optimized most of the code, so based on yue-library
project development of more convenient and simple.
Click to view full version update log
Greenwich.SR1.SR1【2019-07-22】
Major upgrade
- Validation Framework : Provides powerful and comprehensive validation framework that supports multiple parity, parity commonly used in China a clean sweep, friendly
Restful
style tips and more appropriate for domestic use - Asynchronous thread pool : asynchronous thread pool provides default (configurable),
@Async
the common parent thread context, is not lost token asynchronous tasks - Global unified exception handling : default global unified exception handling (no need to manually inherited)
New features
- [Base]
ParamUtils.paramValidate()
will pass check parameter to increase the empty string - [Base]
yue.constant
constant increase in property code timeout - Redis [micro] new letter applet login, user operation clean sweep
change
- [Base] reduce dependence fastjson to find a solution to the problem JSONObject.toJavaObject
- Redis] [standardized development platform for micro-channel QQ login and login
Bug fixes
- [JDBC] DBDAO succession repair
Quick Start
maven item, add the following section of code pom.xml file, and ${version}
replacing the corresponding version number:
<parent>
<groupId>ai.ylyue</groupId>
<artifactId>yue-library-dependencies</artifactId>
<version>${version}</version>
</parent>
Then introduced required modules
<dependencies>
<dependency>
<groupId>ai.ylyue</groupId>
<artifactId>yue-library-base</artifactId>
</dependency>
...
</dependencies>
yue-library version naming, version using SpringCloud name as a prefix, then .SR1, .SR2, .SR3 ... this form, the purpose is to facilitate the distinction version-dependent basis.
And all are dependent on the base module library, if desired, other than the base intake module libraries (such as: data-jdbc, data-redis), may be incorporated without this module.
Configuration
yue-library
Automatic assembling a series of basic Bean and environment configuration item, can application.yml configuration file is closed, all configuration items are measured from the yue.*
beginning, such as: yue.cors.allow=false
representatives do not allow cross-domain.
The default configuration items
- ConstantProperties-yue constant configuration (AES keys, the RSA public key, the RSA private key, Token timeout, the timeout time codes, etc.) See:
base
- Validator- validator (unique Bean, direct coverage) See:
base
- RestTemplate-HTTPS client (the only Bean, direct coverage) see:
base
- DB JDBC database operations, would have a direct inheritance
DBDAO 或 DBTDAO
. See:data-jdbc
- Redis Redis database operations, such as: a distributed lock. See:
data-redis
- User User Bean, such as: login, token operation. See:
data-redis
Optional items
- ExceptionHandlerConfig- global unified exception handling
yue.exception-handler.*
See:base
- AsyncConfig- asynchronous thread pool (shared parent thread context, is not lost token asynchronous tasks)
yue.thread-pool.async.*
See:base
- CorsConfig- cross-domain configuration
yue.cors.*
See:base
- WxMaUser small micro-channel program to log Bean
yue.wx.miniapp.*
See:data-redis
Epilogue
Refer to this project as a basis dependent on the follow-up can also be a good upgrade (single architecture, cluster architecture, micro-services, SOA micro-services) for services architecture.
New development projects, would have a direct line and cluster architecture code form, do not need to start to build a micro-service, the reality can be based on business needs. (SOA partners have not shared in the center)