SpringBoot
未读
SpringBoot启动流程
特性 1.自动配置:针对很多Spring应用程序和常见的应用功能,Spring boot能自动提供相关配置;: 2.起步依赖:告诉Spring boot需要什么功能,它就能引入需要的依赖库; 3.Actuator:让你能够深入运行中的Spring Boot应用程序,一探Spring boot程序的内
SpringBoot
未读
SpringBoot内置工具类
最近发现同事写了不少重复的工具类,发现其中很多功能,Spring 自带的都有。于是整理了本文,希望能够帮助到大家! 断言 断言是一个逻辑判断,用于检查不应该发生的情况 Assert 关键字在 JDK1.4 中引入,可通过 JVM 参数-enableassertions开启 SpringBoot 中提
SpringBoot
未读
SpringBoot中AOP注解@Before等的执行顺序
版本信息 SpringBoot: 2.3.2.RELEASE Spring-Core: 5.2.8.RELEASE AOP切面代码 import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*;
i
SpringBoot
未读
SpringBoot 自定义初始化方案及启动顺序
ServletContextListener初始化 import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import javax.serv
SpringBoot
未读
SpringBoot 入门学习笔记
一、学习路线 简介 详情 SpringBoot 的缓存支持 使用EhCache缓存; 使用Redis缓存; SpringBoot 的安全管理 Spring Security简单入门; 使用Spring Session
SpringBoot
未读
SpringBoot Jar包瘦身
引言 java 项目中常用 maven 工具来进行工程管理,但经常遇到的一个问题是生成的 jar 包越来越大,编译一次工程越来越慢。怎么有效地去除冗余依赖,给 jar 包进行瘦身,是一项必备技能 将环境中已包含的依赖包的 [scope] 设置为 provided pom 中依赖的部分包可能==在你程
SpringBoot
未读
Scheduled的单线程和多线程
1、概序 默认使用单线程模式 2、单线程执行定时任务 @Configuration
@EnableScheduling
public class TestScheduled {
private Logger logger = LoggerFactory.getLogger(TestSched
Spring Boot中的 6 种API请求参数读取方式
不常用的3种 @MatrixVariable 这个我们用的并不是很多,但一些国外系统有提供这类API参数,这种API的参数通过;分割。 比如:这个请求 /books/reviews;isbn=1234;topN=5; 就可以如下面这样,使用 @MatrixVariable 来加载URL中用 ; 分割
SpringBoot
未读
NamedParameterJdbcTemplate
插入单个Bean public void insert(Study study){
String sql = "insert `name`,`age`,`sex` values (:name,:age,:sex)";
SqlParameterSource sps = new Bean
SpringBoot
未读
MybatisProperties增加自定义配置
/**
* @author hubz
* @date 2022/6/8 22:27
**/
@Configuration
public class CustomConfig {
private final MybatisProperties properties;
@Aut