序言
我们好,我是挨踢元老。
年后复产这天,给我们竭尽全力撷取蔬果,那时主要就是紧紧围绕Spring Boot工程项目的低标识符合作开发网络平台diboot,让我们有位基本上介绍,请往下看。
节录
diboot 的结构设计经营理念
• Web 合作开发须要两个基本上概念的此基础架构,把繁杂的难题形式化,最合适还能努力做到较佳操控性,避免出现常用的坑
• 合作开发人员极难被代替,但合作开发人员如果著眼于计算机程序结构设计、销售业务同时实现、症结化解,多次重复 CRUD 没啥虽说
• 低标识符是今后的态势,CRUD 类多次重复有规律的组织工作是能被智能化即使被省去的
diboot 主要就技术栈
• 后端 Java + 关系数据库,跟紧 Spring 体系 (Spring Boot、Spring Cloud)
• ORM 站队 Mybatis,通用 Mappe r架构选用 Mybatis-plus
• 权限: spring boo 版本使用 Shiro+JWT;spring cloud 版本使用 spring security + oauth2
• 前后分离,前端选型 Vue,支持 ElementUI 和 Antd vue pro
diboot 此基础组件
• diboot-core: 精简优化内核:写得更少,操控性更好
• IAM 身份认证此基础组件 及 配套 VUE 前端架构(diboot-antd-admin、diboot-element-admin)
• diboot-file 文件相关处理组件
• diboot-scheduler 定时任务组件
• diboot-message 消息通知组件
• diboot-mobile 移动端组件
diboot-core (diboot-core-starter) 使用步骤
引入依赖
compile(“com.diboot:diboot-core-spring-boot-starter:{latestVersion}”)
2.配置参数(数据源)
#datasource config
spring.datasource.url=jdbc:mysql://localhost:3306/diboot_example?characterEncoding=utf8&serverTimezone=GMT%2B8
spring.datasource.username=diboot
spring.datasource.password=123456
spring.datasource.hikari.maximum-pool-size=5
spring.datasource.hikari.driver-class-name=com.mysql.cj.jdbc.Driver
————————————————————————-
#diboot-core-spring-boot-starter的可选参数配置:
# 是否初始化sql,默认true,初始化之后(或非合作开发环境)能改为false关闭检测
diboot.core.init-sql=false3.配置config类
diboot-core-starter 默认预置了 mybatis-plus 的分页配置(使用 mybatis-plus 3.4.x的 MybatisPlusInterceptor 最新配置方式)。如果您依赖的是core-starter,则无需再次配置 mybatis-plus 的分页。如果须要添加其他Interceptor,则须要重新定义 MybatisPlusInterceptor。示例如下:
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor());
return interceptor;
}
#同时core-starter中也默认配置了HttpMessageConverters,如果须要更改默认配置, 则须要在配置类中重新定义HttpMessageConverters。
@Bean
public HttpMessageConverters jacksonHttpMessageConverters() {
…
}注意:diboot-core-starter 预置了默认的配置以及字典表相关的接口同时实现,如果是老工程项目中仅依赖 diboot-core(非diboot-core-starter),则还须要将 diboot 的包路径加入 ComponentScan 中
diboot 新手体验
在 IDE 中克隆 playground 工程项目
“File -> New -> Project from version control…”菜单打开克隆工程项目对话框:
URL 中输入如下 playground 工程项目路径,指定工程项目本地路径(避免中文路径),点击 Clone 按钮 :https://gitee.com/dibo_software/playground.git
待克隆完成后,在右侧 Maven 视图中,添加 demo 工程项目下的 pom.xml
准备数据库后使用 devtools 初始化标识符
• 点击控制台中打印出的 URL,进入devtools操作页面。(个人用户初次使用须要扫码)
• 初次启动 devtools 会提示初始化组件的此基础标识符(为了方便自定义修改,devtools 将controller 等标识符聚合到本地工程项目中)。依次点击各组件的”聚合标识符”按钮。
• 打开 demo 目录下的 java 目录,将会看到相关组件的初始化标识符已聚合。
注意:如果启动前端发现验证码无法显示,则须要检查是否执行了这个步骤并重启了工程项目。登录验证相关的 controller 须要此步骤中聚合
开源地址:
https://gitee.com/dibo_software/diboot

“在看”
