同步操作将从 geekidea/spring-boot-plus 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
Everyone can develop projects independently, quickly and efficiently!
spring-boot-plus is a background rapid development framework that integrates spring boot common development components.
Front-end and back-end separation, focusing on back-end services
Everyone can develop projects independently, quickly and efficiently!
Middleware | Version | Remark |
---|---|---|
JDK | 1.8+ | JDK1.8 and above |
MySQL | 5.7+ | 5.7 and above |
Redis | 3.2+ |
Component | Version | Remark |
---|---|---|
Spring Boot | 2.1.9.RELEASE | Latest release stable version |
Spring Framework | 5.1.10.RELEASE | Latest release stable version |
Mybatis | 3.5.2 | DAO Framework |
Mybatis Plus | 3.2.0 | mybatis Enhanced framework |
Alibaba Druid | 1.1.20 | Data source |
Fastjson | 1.2.60 | JSON processing toolset |
swagger2 | 2.6.1 | Api document generation tool |
commons-lang3 | 3.9 | Apache language toolkit |
commons-io | 2.6 | Apache IO Toolkit |
commons-codec | 1.13 | Apache Toolkit such as encryption and decryption |
commons-collections4 | 4.4 | Apache collections toolkit |
reflections | 0.9.11 | Reflection Toolkit |
hibernate-validator | 6.0.17.Final | Validator toolkit |
Shiro | 1.4.1 | Permission control |
JWT | 3.8.3 | JSON WEB TOKEN |
hutool-all | 4.6.10 | Common toolset |
lombok | 1.18.8 | Automatically plugs |
mapstruct | 1.3.0.Final | Object property replication tool |
git clone https://github.com/geekidea/spring-boot-plus.git
cd spring-boot-plus
Local environment is used by default, The configuration file:application-local.yml
mvn clean package -Plocal
-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
drop table if exists `sys_user`;
create table sys_user
(
id bigint not null comment ''
primary key,
username varchar(20) not null comment '',
nickname varchar(20) null comment '',
password varchar(64) not null comment '',
salt varchar(32) null comment '',
remark varchar(200) null comment '',
status int default 1 not null comment '',
create_time timestamp default CURRENT_TIMESTAMP null comment '',
update_time timestamp null comment '',
constraint sys_user_username_uindex
unique (username)
)
comment 'SysUser';
-- ----------------------------
-- Records of sys_user
-- ----------------------------
INSERT INTO spring_boot_plus.sys_user (id, username, nickname, password, salt, remark, status, create_time, update_time)
VALUES (1, 'admin', 'Administrators', '751ade2f90ceb660cb2460f12cc6fe08268e628e4607bdb88a00605b3d66973c', 'e4cc3292e3ebc483998adb2c0e4e640e', 'Administrator Account', 1, '2019-08-26 00:52:01', null);
INSERT INTO spring_boot_plus.sys_user (id, username, nickname, password, salt, remark, status, create_time, update_time)
VALUES (2, 'test', 'Testers', '751ade2f90ceb660cb2460f12cc6fe08268e628e4607bdb88a00605b3d66973c', '99952b31c18156169a26bec80fd211f6', 'Tester Account', 1, '2019-10-05 14:04:27', null);
Modify database info
Modify module name / author / table name / primary key id
/src/test/java/io/geekidea/springbootplus/test/CodeGenerator.java
/**
* spring-boot-plus Code Generator
* @author geekidea
* @date 2018-11-08
*/
public class CodeGenerator {
private static final String USER_NAME = "root";
private static final String PASSWORD = "root";
private static final String DRIVER_NAME = "com.mysql.jdbc.Driver";
private static final String DRIVER_URL = "jdbc:mysql://localhost:3306/spring_boot_plus?useUnicode=true&characterEncoding=UTF-8&useSSL=false";
// CODE...
// ############################ Config start ############################
// Module name
private static final String MODULE_NAME = "system";
// Author
private static final String AUTHOR = "geekidea";
// Table name
private static final String TABLE_NAME = "sys_user";
// Primary key id
private static final String PK_ID_COLUMN_NAME = "id";
// Generator strategy. true:All / false:SIMPLE
private static final boolean GENERATOR_STRATEGY = true;
// Pagination list query Whether to sort. true:sort/false:non
private static final boolean PAGE_LIST_ORDER = false;
// ############################ Config end ############################
public static void main(String[] args) {
// Run...
}
}
Generated code structure
/src/main/java/io/geekidea/springbootplus/system
└── system
├── entity
│ └── SysUser.java
├── mapper
│ └── SysUserMapper.java
├── service
│ ├── SysUserService.java
│ └── impl
│ └── SysUserServiceImpl.java
└── web
├── controller
│ └── SysUserController.java
├── param
│ └── SysUserQueryParam.java
└── vo
└── SysUserQueryVo.java
Mapper XML
/src/main/resources/mapper/system/SysUserMapper.xml
Project Main Class
/src/main/java/io/geekidea/springbootplus/SpringBootPlusApplication.java
/**
* spring-boot-plus Project Main Class
* @author geekidea
* @since 2018-11-08
*/
@EnableAsync
@EnableScheduling
@EnableTransactionManagement
@EnableConfigurationProperties
@EnableAdminServer
@MapperScan({"io.geekidea.springbootplus.**.mapper"})
@SpringBootApplication
public class SpringBootPlusApplication {
public static void main(String[] args) {
// Run spring-boot-plus
ConfigurableApplicationContext context = SpringApplication.run(SpringBootPlusApplication.class, args);
// Print Project Info
PrintApplicationInfo.print(context);
}
}
http://127.0.0.1:8888/swagger-ui.html
Install
jdk
,git
,maven
,redis
,mysql
wget -O download-install-all.sh https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/docs/bin/install/download-install-all.sh
sh download-install-all.sh
ALTER USER 'root'@'localhost' IDENTIFIED BY 'Springbootplus666!';
exit
mysql -uroot -pSpringbootplus666!
create database if not exists spring_boot_plus character set utf8mb4;
use spring_boot_plus;
source /root/mysql_spring_boot_plus.sql;
show tables;
exit
deploy.sh
wget -O deploy.sh https://raw.githubusercontent.com/geekidea/spring-boot-plus/master/deploy/deploy.sh
sh deploy.sh
SpringBootAdmin Management page
spring-boot-plus Swagger Document page
http://47.105.159.10:8888/docs
tail -f -n 1000 /root/spring-boot-plus-server/logs/spring-boot-plus.log
spring-boot-plus is under the Apache 2.0 license. See the LICENSE file for details.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。