![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring boot
lvhui321
这个作者很懒,什么都没留下…
展开
-
Hibernate 参数校验之关联数据校验
Hibernate 参数校验之关联数据校验原创 2022-09-10 17:51:33 · 775 阅读 · 0 评论 -
Boot 连接 Impala数据库
Boot 连接 Impala数据库原创 2022-06-28 10:49:13 · 1250 阅读 · 0 评论 -
Boot 自动配置覆盖
当前项目中新建配置bean覆盖第三方配置bean原创 2022-06-27 20:02:38 · 877 阅读 · 0 评论 -
多数据源配置代码
多数据源设置原创 2022-06-27 12:58:53 · 256 阅读 · 0 评论 -
Boot 事务使用
Boot 事务使用原创 2022-06-13 14:48:51 · 106 阅读 · 0 评论 -
Boot 随机端口自动生成
server: port: ${random.int[10000,19999]}原创 2021-08-16 15:51:55 · 265 阅读 · 1 评论 -
Boot 自动装配原理
1.在boot启动时加载@SpringBootApplication注解2.解析@EnableAutoConfiguration注解3.解析对应的@Import将一个对象添加到IoC容器中4.执行ImportSelector接口的实现5.加载META-INF/spring-autoconfigure-metadata.properties的注解元数据信息6.加载META-INF/spring.factories各种类路径,第三方扩展也会通过SPI加载对应的文件...原创 2021-07-13 17:41:08 · 267 阅读 · 0 评论 -
Boot 热部署
1.idea中打开settings,找到Build,Execution,Deployment选中compiler,在Build project automatically打对勾2.快捷键ctrl+shift+alt+'/',选择Registry中的compiler.automake.allow.when.app.running3.pom添加spring-boot-devtools依赖和maven配置 <dependency> <groupId&..原创 2021-07-13 09:38:17 · 358 阅读 · 1 评论 -
Boot 手动获取bean
第一种1.@Componentpublic final class SpringUtils implements BeanFactoryPostProcessor{ /** Spring应用上下文环境 */ private static ConfigurableListableBeanFactory beanFactory; @Override public void postProcessBeanFactory(ConfigurableListableBea原创 2021-07-13 09:29:22 · 357 阅读 · 1 评论 -
Spring 事件(Application Event)
1.解释Spring的事件使Bean和Bean之间的消息可以互相通信,当一个Bean处理完一个任务之后,希望能够被其它Bean感知到并作出相应的处理,这时就需要让其它Bean监听当前Bean所发生的事件。2.自定义事件2.1自定义事件,集成ApplicationEventpackage com.demo.test.event;import org.springframework.context.ApplicationEvent;/** * @author th * * @d原创 2021-07-11 21:47:00 · 480 阅读 · 1 评论 -
MyBatis Plus遇见问题总结
问题一:Error querying database. Cause: com.baomidou.mybatisplus.core.exceptions.MybatisPlusException: The SQL execution time is too large, please optimize !主要是Mybatis Plus性能分析拦截器,用于输出每条 SQL 语句及其执行时间,在MyBatis Plus Config中修改参数,MaxTime:SQL 执行最大时长,超过自动停止运行。示例原创 2021-07-11 20:57:16 · 1354 阅读 · 0 评论 -
logback日志级别动态修改
问题:一般生产环境的日志级别都在INFO及以上,程序出现异常则需要结合更详细的日志去分析问题。这时候就需要动态的更改日志级别,以便定位问题。解决方法:1.自定义api动态修改日志级别2. 集成第三方工具1)集成boot-admin或actuator pom.xml引入包 <dependency> <groupId>de.codecentric</groupId> <artifa...原创 2021-07-11 11:20:35 · 2029 阅读 · 3 评论 -
Boot异常处理-自定义错误页面
1.在pom中添加依赖包 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> </dependency>2.在resources/templates中添加名为error.html原创 2021-07-11 09:54:55 · 166 阅读 · 1 评论 -
Spring boot banner 生成器
1.网址 http://www.network-science.de/ascii/2.按照如图所示操作,就可以得到自己心仪的banner图了原创 2020-08-16 17:56:01 · 637 阅读 · 0 评论 -
AG-Admin 学习之路
一、AG-Admin简介AG-Admin是基于Spring Cloud微服务化开发平台,具有统一授权、认证后台管理系统,其中包含具备用户管理、资源权限管理、网关API管理等多个模块,支持多业务系统并行开发,可以作为后端服务的开发脚手架。核心技术采用Eureka、Fegin、Ribbon、Zuul、Hystrix、JWT Token、Mybatis等主要框架和中间件,前端采用vue-elemen...原创 2018-06-30 17:01:19 · 2917 阅读 · 0 评论