spring
风之感慨
这个作者很懒,什么都没留下…
展开
-
SpringBoot在install时报错Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.3.9.
我的SpringBoot项目,将一个子模块common在install时报错:Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.3.9.RELEASE:repackage (repackage) on project u-common: Execution repackage of goal org.springframework.boot:spring-boot-maven-plugin:2.3.9.原创 2021-11-26 23:43:50 · 1704 阅读 · 0 评论 -
Spring Cloud 启动报错Failed to start bean ‘eurekaAutoServiceRegistration‘;java.lang.NullPointerException
Spring Cloud整合Eureka,启动gateway模块是报错,如下:因为没有具体的提示消息,仔细检查发现原来是该模块application.yml里gateway的路径配置出错,应该是uri,却写成了url????原创 2021-11-16 15:01:35 · 809 阅读 · 0 评论 -
spring系列之——使用@Autowired注解,不建议基于字段的依赖注入
介绍使用@Autowired注解基于字段的依赖注入时,IDEA会出现弱警告,如下:思考:为什么不推荐使用,这种方式是不是有更好的替代方案。依赖注入方式依赖注入有三种方式:基于字段注入 基于构造器注入 基于set方法注入1、基于字段注入@Servicepublic class EmployeeServiceImpl implements EmployeeService { @Autowired private EmployeeMapper emp...原创 2021-10-09 16:36:38 · 10404 阅读 · 5 评论