# spring-fast-server
**Repository Path**: lee_coding/spring-fast-server
## Basic Information
- **Project Name**: spring-fast-server
- **Description**: Spring-fast-serve是一个快速开发的低代码开发库,整合多种后端常用开源技术,自动集成登录流程,通过Generator模块执行生成,包含有对JDBC,ES,CACHE,TASK的支持。自动生成CRUD,自定义HTTP/HTTPS返回Protocol格式,自定义CRUD校验内容,无需SQL,注解Condition实现配置式SQL查询等
- **Primary Language**: Java
- **License**: Apache-2.0
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 6
- **Forks**: 0
- **Created**: 2022-08-16
- **Last Updated**: 2025-04-09
## Categories & Tags
**Categories**: Uncategorized
**Tags**: Java, SpringBoot, Shiro, Generator, MyBatis
## README
# spring-fast-server
#### 介绍
spring-fast-server是一款整合众多优秀后端技术框架的低代码开发库,
通过Generator模块自动生成低代码内容,其中包含有*JDBC*,*CACHE*,*TASK*,
*EXCEL*,*WORD*,*SEARCH*,*SECURE*等众多支持
#### 快速开始
*通过以下代码快速生成项目*
* 修改maven镜像地址
```xml
maven-public
*
maven-public
http://ks.jdnet.cc:8899/repository/maven-public/
```
* 添加依赖
```xml
com.sxjdframework
spring-fast-server-generator
${last.version}
```
* 创建生成
```java
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();
}
}
```
* 项目目录
```text
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
```
* 项目安全配置
```yaml
secure:
#token过期时间
token-expire: 1800
#token过期时间单位
expire-unit: SECONDS
#密码加密模式
password-mode: MD5
#开启验证码
verification-code: false
#支持手机登录,需要实现com.sxjdframework.shiro.spi.SmsService接口
mobile-login-supported: true
#支持email登录
email-login-supported: true
#密码传世过程是否加密 加密类型 AES(Mode.CBC, Padding.PKCS5Padding, Base64.decode(secretKey), Base64.decode(iv))
transmission-encryption: false
#系统白名单
ignored-url:
#网站logo
- /favicon.ico
# Knife4j
- /webjars/**
- /doc.html
- /swagger-resources/**
- /*/v2/api-docs
- /v2/api-docs
```
* 项目启动日志示例
```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
```
**框架的使用可通过生成的注释直接上手**