2 Star 4 Fork 0

PeakLee / spring-fast-server

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.en.md 4.35 KB
一键复制 编辑 原始数据 按行查看 历史
Peaklee 提交于 2022-08-27 18:16 . initial README.md

spring-fast-server

Introduce

Spring fast server is a low code development library that integrates many excellent back-end technical frameworks. It automatically generates low code content through the generator module, including JDBC, cache, task, Excel, word, search, secure and other support

QuickStart

Quickly generate a project with the following code:

  • modify maven image address
    <mirror>
      <id>maven-public</id>
      <mirrorOf>*</mirrorOf>
      <name>maven-public</name>
      <url>http://36.133.250.221:12960/repository/maven-public/</url>
    </mirror>
  • add dependency
        <dependency>
            <groupId>com.sxjdframework</groupId>
            <artifactId>spring-fast-server-generator</artifactId>
            <version>${last.version}</version>
        </dependency>
  • create build

import com.sxjdframework.generator.engine.Engine;
import com.sxjdframework.generator.engine.VelocityEngine;

public class Generator {
    
    public static void main(String[] args){
        //配置生成引擎
        //数据库支持可查看 com.sxjdframework.generator.enums.DBType
        Engine engine = VelocityEngine.getInstance(
                "jdbc:mysql://数据库URL",
                "数据库用户名",
                "数据库密码",
                "项目名称",
                "项目包名");
        //生成,生成默认在D:\\tmp文件夹下
        //可通过engine.setBaseDir("项目生成地址")设置;
        File zip = engine.zip();
    }
}
  • project structure
src
|__main
   |__java
   |  |__package
   |     |__config
   |     |  |__MyBatisMetaHandler.java
   |     |__controller
   |     |  |__Controller.java
   |     |__entity
   |     |  |__Entity.java
   |     |__filter
   |     |  |__CustomFilter.java
   |     |__login
   |     |  |__SmsProvider.java
   |     |  |__UserDetailProvider.java
   |     |  |__UserDetailToken.java
   |     |__mapper
   |     |  |__mapper.interface
   |     |__protocol
   |     |  |__ProtocolConfig.java
   |     |  |__ResultCode.enum
   |     |__service
   |     |  |__Service.java
   |     |  |__impl
   |     |     |__Impl.interface
   |     |__vo
   |     |  |__Query.java
   |     |__AppServer.java
   |__resource
      |__mapper
      |  |__mapper.xml
      |__application.yml
  • project security configuration
secure:
  token-expire: 1800
  expire-unit: SECONDS
  password-mode: MD5
  verification-code: false
  #Support mobile phone login, which needs to be implementedcom.sxjdframework.shiro.spi.SmsService接口
  mobile-login-supported: true
  #support email login
  email-login-supported: true
  #Whether the password transmission process is encrypted (encryption type) AES(Mode.CBC, Padding.PKCS5Padding, Base64.decode(secretKey), Base64.decode(iv))
  transmission-encryption: false
  #system white list
  ignored-url:
    #website logo
    - /favicon.ico
    # Knife4j
    - /webjars/**
    - /doc.html
    - /swagger-resources/**
    - /*/v2/api-docs
    - /v2/api-docs
  • example of project startup log
The login interface provided by the framework is:
	Login       : POST http://172.25.224.1:8080/api/auth/login
	Encryption  : GET  http://172.25.224.1:8080/api/auth/aes-iv
	SMS Code    : GET  http://172.25.224.1:8080/api/auth/sms
	Verify Code : GET  http://172.25.224.1:8080/api/auth/code
the parameters required for these interfaces are:
 Login Parameter       :
	{
    "username": "Enter user name in password and verification code mode, enter mobile number in mobile number mode, and enter email in email mode",
    "password": "User name password",
    "unique": "Password encryption input encryption unique, the provider is encryption",
    "type": "Three modes of password, mobile and email are provided,The optional values are: PASSWORD | MOBILE | EMAIL",
    "code": "Turn on the verification code mobile number mode and enter the verification code"
}
 Encryption Parameter  :
	Unwanted
 SMS Code Parameter    :
	{
    "phone": "User mobile number"
}
 Verify Code Parameter :
	{
    "username": "User name or email"
} 
2022-08-27 17:49:11.649  INFO 26932 --- [           main] c.s.web.bootstrap.InitSwaggerConsole     : 
 
The project doc document address is:
	Swagger-ui : http://172.25.224.1:8080/swagger-ui.html
	Document   : http://172.25.224.1:8080/doc.html 

The use of the framework can be directly started through the generated annotations

Java
1
https://gitee.com/lee_coding/spring-fast-server.git
git@gitee.com:lee_coding/spring-fast-server.git
lee_coding
spring-fast-server
spring-fast-server
master

搜索帮助