随笔分类 -  【2-框架】SpringBoot

摘要:参考: https://cloud.tencent.com/developer/article/1790411 实现了国际化的参数校验 开发过程: 1、Bean定义字段校验规则: 2、Controller引入@Valid(来自)或@Validated(来自org.springframework.va 阅读全文
posted @ 2023-08-19 15:45 飞翔在天 阅读(61) 评论(0) 推荐(0) 编辑
摘要:Spring Boot Starters帮助我们快速继承并使用各种三方件。 一、命名规范 官方Starter: 遵循spring-boot-starter*格式,如 spring-boot-starter-data-redis、spring-boot-starter-web 非Spring官方: 建 阅读全文
posted @ 2022-06-05 19:15 飞翔在天 阅读(162) 评论(0) 推荐(0) 编辑
摘要:基本的SpringBoot的应用程序,有两个重要元素: 注解:@SpringBootApplication 启动方法:SpringApplication.run(FirstBootApplication.class, args) ; 1、@SpringBootApplication注解 1 @Tar 阅读全文
posted @ 2022-06-05 16:54 飞翔在天 阅读(193) 评论(0) 推荐(0) 编辑
摘要:启动后自动执行任务 实现CommandLineRunner接口,实现其中的run(String... args) 方法。 如果存在多个实现类,则指定 @Order注解决定顺序 @SpringBootApplication @Order(2) public class Application impl 阅读全文
posted @ 2021-11-01 21:05 飞翔在天 阅读(24) 评论(0) 推荐(0) 编辑
摘要:官网: https://docs.spring.io/spring-security/site/docs/5.3.2.RELEASE/reference/html5/ Spring Security provides comprehensive support for authentication, 阅读全文
posted @ 2020-08-17 23:47 飞翔在天 阅读(304) 评论(0) 推荐(0) 编辑
摘要:参考: SpringBoot读取配置的6种方式 https://www.bilibili.com/video/BV1hh4y1j7mC/?spm_id_from=333.337.search-card.all.click&vd_source=898d5514be58985430a49b46d5500 阅读全文
posted @ 2019-12-07 13:27 飞翔在天 阅读(824) 评论(0) 推荐(0) 编辑
摘要:参考:https://www.bilibili.com/video/av38657363?p=1 一、SpringBoot优点: 二、HelloWorld Demo构建 1)新建Maven工程(略过) 2)增加Maven依赖(参考spring官网中springboot的quickstart) 3)通 阅读全文
posted @ 2019-12-04 00:14 飞翔在天 阅读(281) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示