主题 : jeecmsx1.6源码导入idea,缺少包依赖 |
级别: 秀才
![]() |
22# 发表于:2020-12-19 16:27:46 IP:118.99.*.*
你好,我这边打包是可以了,但在以jar方式启动服务时报错:
org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.context.ApplicationContextException: Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean. 这时,我在启动类CmsFrontApplication这个类的头部添加注解:@SpringBootApplication 这个时候重新启动,不报刚才那个错了,但是又报了另外一个错(大概意思是spring启动的时候有两个相同的class文件且bean的名称都相同),报错内容如下: Annotation-specified bean name 'userCollectionController' for bean class [com.jeecms.member.controller.UserCollectionController] conflicts with existing, non-compatible bean definition of same name and class [com.jeecms.front.controller.UserCollectionController] |
||
---|---|---|---|
级别: 秀才
![]() |
24# 发表于:2020-12-19 16:31:38 IP:118.99.*.*
哪个是旧的呢?member.controller.UserCollectionController 还是 front.controller.UserCollectionController ?
|
||
---|---|---|---|
级别: 秀才
![]() |
26# 发表于:2020-12-19 16:40:16 IP:118.99.*.*
但确实就报那个错了,bean名称定义的是一样的,但我看代码里也配置了,可以允许覆盖spring.main.allow-bean-definition-overriding=true,所以不知道哪儿出了问题
|
||
---|---|---|---|
级别: 管理员
![]() |
28# 发表于:2020-12-19 16:47:21 IP:111.202.*.*
回复第26楼itranslater.com/qa/details/2582701983077499904 您看看这个博客
|
||
---|---|---|---|
级别: 秀才
![]() |
29# 发表于:2020-12-19 18:04:22 IP:118.99.*.*
多谢了,我这边之前一直以jar方式启动,就会报各种错,使用外置tomcat启动就可以,感谢~
|
||
---|---|---|---|