3.2.2 Update details:

  1. – fix(core): enumerates the error bug of value passing “” and null

  2. – fix(lamp-file): fixes errors reported in attachment downloading

  3. – fix(lamp-generator): Fixes code generator generating duplicate fields in tree pages

  4. – refactor(boot): optimizes the export and preview functions of PoiController, making it easier for subclasses to rewrite exported data. – refactor(authority): improves the import and export functions of user and job management, and supports template download, preview, and direct export

  5. – refactor: verifies the uniqueness of the organization name, position name, and user account

  6. – feat(lamp-Web-plus) Improves the CRUD function of organization, job, and user modules, and optimize the import and export components

  7. – feat(lamp-samples): added example items to provide common usage examples. (e.g. : None mode multi-data source configuration, distributed transaction solution, cache usage, data echo, unified front and back end validation, etc.)

“Light” in the background rapid development platform

Origin of lamp

The narrative version:

In a dark and windy night, the child clamored to go out to play, so with the programmer’s wife to take the child out for exercise, the way to discuss the project to change what name, in their own names have been rejected by each other, we fell into meditation. Walk, in a street lamp, children hit staring street lamp break quiet, shout out: lamp lamp ~ I and daughter-in-law leng for a while, and then look at each other and say: ha ha, this name good ~

Explain version:

Lamp lamp: it is the first word my child would say when learning to speak. It is also a name that my child pointed out in a single word after I thought of many project names. Lamp lamp symbolizes light, brings hope to us in difficulties, and guides the programmers who return home at night after working overtime

Lamp (lamp for short, English name: LAMP), he is a project collectively, including the following sub-projects

If you have to say lamp is Linux+Apache+MySQL+PHP, then so be it, PHP is the best language in the world, and I want this project to be the best backend framework in the world! 😈 😈 😈

Lamp project Composition

1) Toolset (lamp-util project required, other 2 optional)

project

gitee

github

note

Tool set

lamp-util

lamp-util

A business-neutral toolset that cloud and Boot projects rely on

Code generator

lamp-generator

lamp-generator

For developers to use

Timing scheduler

lamp-job

lamp-job

Has not yet been developed

2) Back-end (the following two projects have the same functions, so you can choose one of them)

project

gitee

github

note

The service version

lamp-cloud

lamp-cloud

SpringCloud version

Single version

lamp-boot

lamp-boot

SpringBoot (basically the same functionality as lamp-Cloud)

3) Front end (the following three projects have the same function, you can choose one of them)

project

gitee

github

note

The tenant background

lamp-web

lamp-web

Development based on vue-Admin-Element (vue2.x)

The tenant background

lamp-web-beautiful

lamp-web-beautiful

Development based on VUe-Admin-beautiful (vue2.x)

Tenant background (highly recommended! 👏 👏 👏)

lamp-web-plus

lamp-web-plus

Developed based on vue-vben-admin (vue3.x)

Lamp – cloud profile

Lamp-cloud, formerly zuihou-admin-Cloud, was renamed lamp-Cloud starting with version 3.0.0 and is a member of the LAMP project.

Lamp-cloud is based on JDk11 / JDK8 + SpringCloud(Hoxton.SR10) + SpringBoot(2.3.10.RELEASE) microservice rapid development platform, in which the configurable SaaS function is particularly shining. It has multiple modules such as RBAC function, unified gateway authentication, Xss anti-cross-site attack, automatic code generation, multiple storage systems, distributed transactions, and distributed scheduled tasks. It supports the parallel development of multiple business systems and services, and can serve as the development scaffolding of back-end services. The code is concise, the annotation is complete, the architecture is clear, very suitable for learning and the enterprise uses as the foundation framework.

The core technology adopts Spring Cloud Alibaba, SpringBoot, Mybatis, Seata, Sentinel, RabbitMQ, FastDFS/MinIO, SkyWalking and other main frameworks and middleware. We hope to build a set of solutions from JavaWeb infrastructure framework – distributed micro-service architecture – continuous integration – system monitoring. This project is designed to achieve basic capabilities and does not involve specific operations.

Lamp Describes the tenant mode

The tenant mode of the project can be easily changed through configuration.

The tenant model

describe

advantages

disadvantages

NONE(Non-tenant mode)

There is no tenant

Simple and suitable for standalone systems

Lack of advantages of tenant system

COLUMN(Field mode)

Tenants share the same database and add fields to the service table to distinguish them

Simple, uncomplex, development without perception

Poor data isolation, poor security, difficult data backup and recovery,

SCHEMA (independent SCHEMA)

Each tenant has an independent database (Schema). When SQL is executed, the schema is dynamically added before the table name

Simple, development without perception, good data isolation

The database root account must be configured in the configuration file. Complex SQL and SQL nested user-defined functions are not supported

DATASOURCE independent DATASOURCE

Each tenant has an independent database (data source), which is dynamically switched when executing code

The database can be deployed independently, with good data isolation, high scalability and low impact of faults

Relatively complex, development needs to pay attention to the transaction issues when switching data sources, need more databases

Lamp Member version project demo address

  • Lamp-web-plus demo address: TangyH. top:3100
  • Lamp-web demo address: TangyH. top:10000/lamp-web
  • Lamp-web-beautiful demo address: TangyH. top:180
  • The following built-in accounts are limited to built-in 0000 tenants
  • Platform Administrator: LAMp_PT/LAMP (built-in for internal operations)
  • Super administrator: LAMP/LAMP
  • Common administrator: General/LAMP
  • Common account: normal/lamp

Ps: The built-in tenant in the demo environment does not have write permission. To add, delete, or modify the tenant administrator account in the demo environment, query the tenant administrator account using the lamp_pt account and log in to the new tenant test

Lamp-cloud /lamp-boot + lamp-web service

  1. Tenant management: Operations personnel manage all tenant creation
  2. Workbench: Common functions used by common users
  3. Organization management: organization, post, user data maintenance, reset user password, etc
  4. Resource center: manage messages, SMS messages and attachments
  5. Process management: Process deployment, model management, process samples
  6. System Settings: Menus, resource configuration, role management, binding users to roles, authorizing menus and resources to roles, dictionaries, regions, system parameters, operation logs, login logs, and application management
  7. Gateway Settings: traffic limiting and access blocking
  8. Developer management: scheduled tasks, interface documentation, registration & configuration center, service monitoring, database monitoring, Zipkin monitoring, SkyWalking monitoring

Lamp – Cloud Project Highlights

  1. Service Registration & Discovery & Invocation:

    Service registration and discovery based on Nacos, using Feign to realize service intermodulation, can achieve the same coding experience when using HTTP to request remote calls as calling local methods, developers do not know that this is a remote method, let alone an HTTP request.

  2. Load balancing:

    In addition to node.js and Nginx, Spring Cloud series Zuul and Ribbon can help us carry out normal gateway control and load balancing. Among them, the extension and reference of foreign projects is based on the Zuul current limiting plug-in of JWT.

  3. Service authentication:

    JWT is adopted to strengthen the authorization verification of inter-service scheduling to ensure the security of internal services.

  4. Circuit breaker mechanism:

    Since the distribution of services is adopted, Hystrix is used as a fuse to avoid “avalanches” of calls between services.

  5. Monitoring:

    Spring Boot Admin is used to monitor the running status of each independent Service. Turbine was used to check the running status and call frequency of the interface in real time. Use Zipkin to view call chains between services, etc.

  6. Link call monitoring:

    At the same time, Zipkin and SkyWalking are realized as the whole link performance monitoring of the project, and indicators are displayed from the whole dimension to the local dimension. The performance information of all call chains across applications is displayed in a centralized manner, which can easily measure the whole and local performance, find the source of failure, and greatly shorten the troubleshooting time in production.

  7. Data access

    Based on Mybatis DataScopeInnerInterceptor blocker to realize the function of data access

  8. SaaS(multi-tenant) sense-free solution

    This project supports three common tenant solutions and no tenant solutions, the same set of code, modify a configuration can achieve the tenant mode only switch.

  9. Cache abstraction

    Use CacheOps to operate the cache, with two built-in implementations, Caffeine and Redis, to enable projects to run properly in an emergency environment without Redis

  10. Elegant Bean transformations

Use Dozer, BeanUtil and other components to optimize the transformation of DTO, DO, PO and other objectsCopy the code
  1. Unified form validation at the front and back ends
Rigorous form verification usually requires both front-end and back-end verification, but in traditional projects, only the front and back ends can be checked once, and the back and front ends have to be modified at the same time when rules are changed in the later period. Therefore, based on 'hibernate-Validator', the 'lamp-Validator-starter' is encapsulated to provide a general interface for obtaining the rules that need to be verified, and then the front-end uses the rules returned by the back-end. If the rules change in the future, only the back-end can modify them.Copy the code
  1. Anti-cross-site scripting (XSS)
* All application/ Json type parameters are filtered through the Json deserializer implementationCopy the code
  1. Current logged-in user information injector
* User identity injection through annotationsCopy the code
  1. The online API
Since some functions of native Swagger-UI are not friendly enough, domestic open source 'KNIfe4J' is adopted and stater is made for springboot users to use.Copy the code
  1. Code generator
Mybatis plus-Generator defines a set of code generators to automatically generate enumeration classes, data dictionary annotations, SaveDTO, UpdateDTO, form validation rule annotations, Swagger annotations, etc., by configuring annotations for database fields.Copy the code
  1. Scheduled task scheduler:
Feature enhancements based on XXL-Jobs. (e.g., send tasks at specified times, combine projects with executor and scheduler, multiple data sources)Copy the code
  1. Large file/breakpoint/Fragment continuation
Front end USES webupload js, back-end large File breakpoint shard was realized using the NIO continuingly, start the Eureka, Zuul, File services, directly open the docs/chunkUploadDemo/demo. HTML can be tested. According to the test, the File service can be successfully uploaded within 5 minutes with 4.6G+ large files after the local stack maximum memory 128M is started. However, the formal service takes a long time due to the influence of user bandwidth and server bandwidth.Copy the code
  1. Distributed transaction
Integrated ali distributed transaction middleware: SeATA, to solve the problem of distributed transaction in micro-service scenarios in the most efficient and most intrusive way to business.Copy the code
  1. Automatic injectors for associated data across tables, libraries, and services
It is used to solve the pain of associated data displayed across tables, libraries, and services for paging data attributes or attributes of a single object. It supports automatic injection of static data attributes (data dictionary) and dynamic primary key data.Copy the code
  1. Gray released
In order to solve the problem of frequent service updates coming online, version rollback, rapid iteration, and collaborative development within the company, this project adopts the load balancing strategy of the Ribbon to achieve grayscale release.Copy the code

Lamp-cloud Technology Stack/Version introduction:

  • The related technologies involved are:
    • JSON serialization :Jackson
    • Message queue: RabbitMQ
    • Cache: Redis
    • Database: MySQL 5.7.9 or MySQL 8.0.19
    • Timer: xxL-JOBS project is used for secondary transformation
    • Front end: vue + Element-UI
    • Persistence layer framework: Mybatis- Plus
    • Code generator: custom based on Mybatis- plus-Generator
    • API Gateway: Gateway/ Zuul
    • Service Registry & Discovery and Configuration Center: Nacos
    • Service consumption: OpenFeign
    • Load balancing: Ribbon
    • Service fuse: Hystrix
    • Project construction: Maven
    • Distributed transactions: SEATA
    • Traffic Defense for distributed systems: Sentinel
    • Monitoring: spring – the boot – admin
    • Link call tracking: zipkin/SkyWalking
    • File server: FastDFS 5.0.5/ Ali Cloud OSS/ local storage /MinIO
    • Nginx
  • Deployment:
    • Server: CentOS
    • Jenkins
    • Docker
    • Kubernetes

Project screenshots:

preview

preview