spring
白开水233
朴实无华的打工人,记录踩过的坑
展开
-
spring-boot-maven-plugin打可依赖包
maven打包, package 不存在问题原创 2022-11-03 08:41:07 · 739 阅读 · 0 评论 -
@Resource与@Autowired区别
前者默认byName也可byType,后者只能byType,若需byName,则需要@Qualifier注解配合前者由jdk实现,后者spring实现原创 2022-02-21 20:10:28 · 133 阅读 · 0 评论 -
Spring事务失效的原因
1、数据库引擎不支持事务MYISAM2、servcie类没有被 Spring 管理3、方法不是 public 的4、自身调用问题(没被@Transcational修饰的方法调用了被@Transcational修饰的方法)5、异常被吃了,抛出了Exception而不是RuntimeExeception...原创 2022-02-21 20:05:22 · 86 阅读 · 0 评论 -
documentationPluginsBootstrapper NullPointerException knife4j-spring-boot-starter
部分pom<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.6.2</version> <relativePath/> <!-- lookup parent fr原创 2022-01-04 14:05:11 · 566 阅读 · 0 评论 -
@Value(“${test.app}“) 注解取到的值是是${}
可能是有两个配置文件,spring-mvc.xml 没有配置,导致controller使用@Value取到的值是()里面的值。加下面的配置。s<context:property-placeholder location=“classpath:jdbc.properties”/>原创 2020-12-21 17:36:17 · 705 阅读 · 0 评论