zuihou-admin-boot 2.7.0 released, access to SkyWalking

2.7.0 version update details:

  1.  fix: After the repair task is started, update the task trigger time, it will not take effect. fix:29
  2.  fix: redis persistence strategy does not affect global configuration
  3.  fix: fix the bug that the uid module may report an error when starting
  4.  feat: Rename IgnoreTokenProperties to IgnoreProperties, and change the original configuration `ignore.token.url` to `zuihou.ignore.xxx`
  5.  feat: discard useless unit tests
  6.  feat: Replace StringUtils of apache with StrUtil of hutool
  7.  feat: xss-starter related functions support configuration through configuration files
  8.  feat: SysLog annotation supports getting parameters in the current thread context. Usage #threadLocal.name
  9.  feat: Data injection code structure, comment optimization
  10.  feat: Data injection supports ignoring injection of specified fields
  11.  feat: Code comments are improved, code logic is optimized, and bugs fixed
  12.  feat: Connect to SkyWalking

Tenant model:

Tenant model description advantage Disadvantage Distributed transaction
NONE (non-tenant mode)  No tenants Simple and suitable for independent systems Lack of convenience of tenant system stand by
COLUMN (field mode) Tenants share a database and add fields to the business table to distinguish   Simple, uncomplicated, development without perception  Poor data isolation, poor security, difficult data backup and recovery stand by
SCHEMA (independent schema)  Each tenant has an independent database (schema). When executing sql, dynamically add the schema before the table name Simple, no perception of development, good data isolation The root account of the database must be configured in the configuration file, and complex SQL and SQL nested custom functions are not supported stand by
DATASOURCE (independent data source)  Each tenant has an independent database (data source), and the data source is dynamically switched when the code is executed The database can be deployed independently, with good data isolation, high scalability, and low failure impact Relatively complex, development needs to pay attention to transaction issues when switching data sources, and requires more databases stand by

 

Video list: ( Video acquisition address )

 

Introduction:


SaaS microservice scaffolding based on SpringBoot (2.2.9.RELEASE), with user management, resource authority management, unified gateway authentication, Xss anti-cross-site attack, automatic code generation, multiple storage systems, distributed transactions, distributed timing Multiple modules such as tasks support parallel development of multiple business systems and parallel development of multiple services, which can be used as a development scaffold for back-end services. The code is concise and the structure is clear, which is very suitable for learning and use. The core technology uses Mybatis, SpringBoot, JWT Token, RabbitMQ, FastDFS and other main frameworks and middleware.

I hope to work hard to create a solution from  SaaS basic framework  -monolithic architecture  -  automated deployment  -  system monitoring  . This project aims to achieve basic capabilities and does not involve specific businesses.
 

Function introduction:

 Interface authentication:

JWT is used to strengthen the authorization verification of scheduling between services to ensure the security of internal services.

monitor:

Use Spring Boot Admin to monitor the running status of each independent Service; use turbine to view the running status and calling frequency of the interface in real time

data permission:

Simple data permissions are implemented using the DataScopeInterceptor interceptor based on Mybatis

SaaS's non-sense solution:

Use Mybatis interceptor to intercept all SQL and modify the default Schema to achieve the purpose of multi-tenant data isolation.

Secondary cache:

J2Cache is used to operate the cache, the first level cache uses memory (Caffeine), and the second level cache uses Redis. Since a large number of cache reads will cause the L2 network to become the bottleneck of the entire system, the goal of L1 is to reduce the number of reads to L2. The caching framework is mainly used in a cluster environment. It can also be used on a stand-alone computer to avoid the impact on the back-end business after the cold restart of the cache caused by application restart.

Elegant Bean conversion:

Use Dozer components to optimize the conversion of DTO, DO, PO and other objects

Unified front-end and back-end form validation:

Rigorous form validation usually requires both front-end and back-end verification, but traditional projects can only be tested once for each front and back. After the rule changes, the front and back ends must be modified at the same time. Therefore, on the basis of hibernate-validator, the initial dependency of Zuihou-validator-starter is encapsulated, and a common interface is provided to obtain the rules that need to verify the form, and then the front-end uses the rules returned by the back-end. If the rules change in the future, only the back-end is required Just modify it.

Anti-cross-site scripting (XSS):

  •      Filter the form parameters in all requests through filters
  •      Realize filtering of all application/json type parameters through Json deserializer

Current user information injector:

 User identity injection through annotations

Online API:

Because some functions of native swagger-ui are not friendly enough, the domestic open source knife4j is adopted and a statuser is made to facilitate the use of springboot users.

Code generator:

A set of code generator is customized based on Mybatis-plus-generator. By configuring the annotations of the database fields, it automatically generates enumerations, data dictionary annotations, SaveDTO, UpdateDTO, form validation rule annotations, Swagger annotations, etc.

Timed task scheduler:

Enhanced functions based on xxl-jobs. (Such as: sending tasks at specified time, executor and scheduler combined projects, multiple data sources)

Large file/breakpoint/slice resume:

The front-end uses webupload.js and the back-end uses NIO to realize large file breakpoint and fragmented resuming. After starting the Eureka, Zuul, and File services, directly open docs/chunkUploadDemo/demo.html to test. After testing, the file service is started with a local limit of 128M of the maximum memory of the stack, and a large file of 4.6G+ can be successfully uploaded within 5 minutes. The time consumption of the official service will be affected by the bandwidth of the user and the server, and the time is relatively long.

Distributed transaction:

Integrate Ali's distributed transaction middleware: seata, to  solve the distributed transaction problems faced by microservices in an  efficient  and intrusive way to the business  .

Automatic injection of associated data:

It is used to solve the pain of inter-table, cross-database, and cross-service paging data attributes or the attributes of a single object to echo associated data. It supports automatic injection of static data attributes (data dictionary) and dynamic primary key data.

Project code address

project gitee github Remarks
Micro service project https://gitee.com/zuihou111/zuihou-admin-cloud https://github.com/zuihou/zuihou-admin-cloud SpringCloud version backend code
Single project https://gitee.com/zuihou111/zuihou-admin-boot https://github.com/zuihou/zuihou-admin-boot SpringBoot version backend code
Tenant background https://gitee.com/zuihou111/zuihou-ui https://github.com/zuihou/zuihou-ui | Front end for customers
Development & operation background https://gitee.com/zuihou111/zuihou-admin-ui https://github.com/zuihou/zuihou-admin-ui Used by the company's internal development & operation & operation and maintenance personnel
Code generator https://gitee.com/zuihou111/zuihou-generator https://github.com/zuihou/zuihou-generator Developers use
Core toolkit https://gitee.com/zuihou111/zuihou-commons https://github.com/zuihou/zuihou-commons Core toolkit

Demonstration address (the demo account has no write permission, only query)

project Demo address Administrator account Ordinary account
Tenant background http://tangyh.top:10000/zuihou-ui zuihou/zuihou test/zuiou
Development & operation background http://tangyh.top:180/zuihou-admin-ui demoAdmin/zuihou no

Guess you like

Origin www.oschina.net/news/120461/zuihou-admin-boot-2-7-0-released