上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 65 下一页
  2024年1月15日
摘要: Spring AOP 中@Pointcut的用法(多个Pointcut) /** swagger切面,分开来写 **/ @Aspect @Component public class ApiOperationLogAspect { private Logger logger = LoggerFact 阅读全文
posted @ 2024-01-15 19:10 oktokeep 阅读(1568) 评论(0) 推荐(0)
摘要: springboot拦截器@resource注解注入为null解决方案 拦截适配配置 为什么@resource注入为nullinteceptor在springcontext之前加载,注入必然是null 解决方案加入注解@Bean,注意需要使用@Configuration,而不是@Component解 阅读全文
posted @ 2024-01-15 19:08 oktokeep 阅读(1114) 评论(0) 推荐(0)
摘要: spring mvc GET请求方式及传参 @Api(tags = "管理接口") @Slf4j @RestController @RequestMapping("/myOutApi/public/test") public class MyManageController{ @Autowired 阅读全文
posted @ 2024-01-15 19:08 oktokeep 阅读(308) 评论(0) 推荐(0)
摘要: springboot项目配置多数据源 //关键:mybatis文件的目录需要区分开来 sqlSessionFactoryBean.setMapperLocations(new PathMatchingResourcePatternResolver().getResources("classpath: 阅读全文
posted @ 2024-01-15 19:06 oktokeep 阅读(82) 评论(0) 推荐(0)
摘要: 如果redis没有设置expire,他是否默认永不过期?默认是的 通过EXPIRE key seconds 命令来设置数据的过期时间。返回1表明设置成功,返回0表明key不存在或者不能成功设置过期时间。在key上设置了过期时间后key将在指定的秒数后被自动删除。被指定了过期时间的key在Redis中 阅读全文
posted @ 2024-01-15 18:57 oktokeep 阅读(370) 评论(0) 推荐(0)
摘要: Java中的ThreadLocal和 InheritableThreadLocal package com.example.core.mydemo.java; /** * output * Thread-0 ThreadLocal value :null * Thread-0 Inheritable 阅读全文
posted @ 2024-01-15 18:55 oktokeep 阅读(47) 评论(0) 推荐(0)
摘要: Idea SpringBoot 子模块 加载不到该子模块根目录config下面的配置文件 import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; impor 阅读全文
posted @ 2024-01-15 18:54 oktokeep 阅读(492) 评论(0) 推荐(0)
摘要: springboot增加@EnableAsync注解,否则方法中的@Async注解没有生效。 @EnableFeignClients(basePackages = {"com.test", "com.test.order"})@EnableAsync@EnableEurekaClient@Sprin 阅读全文
posted @ 2024-01-15 18:46 oktokeep 阅读(69) 评论(0) 推荐(0)
  2024年1月14日
摘要: 1.类名重复了:项目和子模块中存在类名相同的java类,启动项目的时候会报错。Caused by: org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean 阅读全文
posted @ 2024-01-14 20:00 oktokeep 阅读(87) 评论(0) 推荐(0)
  2023年12月25日
摘要: postman打开白屏 1.打开高级系统设置;2.在“高级”选项卡中,单击“环境变量”;3.添加一个新的系统变量:POSTMAN_DISABLE_GPU=true4.关闭Postman并重新打开(或者关闭电脑重新启动) 阅读全文
posted @ 2023-12-25 19:09 oktokeep 阅读(1399) 评论(0) 推荐(0)
上一页 1 ··· 27 28 29 30 31 32 33 34 35 ··· 65 下一页