-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lamp-gateway-server模块启动报错 #72
Comments
参考: #45 |
没有自建服务,这是lamp源码没有改动的 |
|
好的,谢谢,问题已解决! |
麻烦回复下解决方案 |
因为我的nacos导入配置没有注意命名空间,所以没有获取到nacos配置 |
项目中用的Apollo,第一次用nacos,所以犯了这么简单的错误 |
还是没有认真看文档,如果认真看了文档就不会瞎弄半天,百思不得其解 |
版本信息:
JDK 版本(必填) : 1.8.x
源码版本(必填):3.0.2
MySQL(必填): 8.0.21
Nacos(必填):1.3.2
问题描述:
已使用maven helper工具查看依赖,没有spring-webmvc依赖,lamp-gateway-server.yml中配置了lamp.webmvc.enabled=false,如你所说在lamp-boot-util中GlobalMvcConfigurer实现了WebMvcConfigurer,但依赖lamp-boot-util已经排除了spring-webmvc依赖,还要怎么排除GlobalMvcConfigurer?报错中是LampRabbitMqConfiguration$RabbitMqConfiguration,这里面没有发现有关springmvc的东西?
报错截图
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
[lamp-gateway-server:0000::] 2021-01-17 20:27:34.827:[ERROR] [12412] [] [main:24863] [org.springframework.boot.SpringApplication.reportFailure:837] Application run failed
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [com.tangyh.basic.mq.LampRabbitMqConfiguration$RabbitMqConfiguration]; nested exception is java.io.FileNotFoundException: class path resource [org/springframework/web/servlet/config/annotation/WebMvcConfigurer.class] cannot be opened because it does not exist
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:610)
at org.springframework.context.annotation.ConfigurationClassParser.access$800(ConfigurationClassParser.java:111)
at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.lambda$processGroupImports$1(ConfigurationClassParser.java:812)
at java.util.ArrayList.forEach(ArrayList.java:1259)
at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.processGroupImports(ConfigurationClassParser.java:809)
at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorHandler.process(ConfigurationClassParser.java:780)
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:193)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:319)
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:236)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:280)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:96)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:707)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:533)
at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:62)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:405)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
at com.tangyh.lamp.GatewayServerApplication.main(GatewayServerApplication.java:34)
Caused by: java.io.FileNotFoundException: class path resource [org/springframework/web/servlet/config/annotation/WebMvcConfigurer.class] cannot be opened because it does not exist
重现步骤
The text was updated successfully, but these errors were encountered: