springboot 5
-
使用Mybatis-plus,重写Service
使用Mybatis-plus,重写Serviceservice接口:service extends AbstracService<T>service实现类:serviceimpl extends AbstracServiceImpl<M,T> implements serv
-
SpringBoot 项目中 Redis连接超时
SpringBoot 项目中 Redis连接超时项目运行中,请求重复提示redis连接超时,引入netty心跳机制添加配置// 在redisConfig文件中添加下列代码 @Bean public ClientResources clientResources(){ Net
-
Springboot项目配置Redis中key过期回调事件
Springboot项目配置Redis中key过期回调事件大部分的时间,Redis中的key过期,是不用回调的,但是特殊情况下,需要监听。添加配置信息@Configuration@EnableCachingpublic class RedisConfig extends CachingConfigu
-
SpringBoot将默认的Tomcat替换为Undertow
SpringBoot将默认的Tomcat替换为UndertowSpringBoot 可以无缝衔接三大 Servlet 容器,Tomcat、Jetty、Undertow,但是 Undertow 性能相较前两者更加优异SpringBoot 快速集成Undertow添加依赖<dependency&g
-
SpringBoot 常用注解
SpringBoot 常用注解一、注解(annotations)列表@SpringBootApplication:包含了@ComponentScan、@Configuration和@EnableAutoConfiguration注解。其中@ComponentScan让spring Boot扫描到Co