当前位置:网站首页>解决** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the defau
解决** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the defau
2022-07-02 12:32:00 【请告诉他】
springboot 的application.java不能放在main.java下
需要建立一个新包
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [GraspApp]; nested exception is java.io.FileNotFoundException: class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfigurerAdapter.class] cannot be opened because it does not exist
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:181) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:315) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:232) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:705) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:531) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at GraspApp.main(GraspApp.java:11) [classes/:na]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_121]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_121]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_121]
at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.1.4.RELEASE.jar:2.1.4.RELEASE]
Caused by: java.io.FileNotFoundException: class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfigurerAdapter.class] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:180) ~[spring-core-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:51) ~[spring-core-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:103) ~[spring-core-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.createMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:88) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.boot.type.classreading.ConcurrentReferenceCachingMetadataReaderFactory.getMetadataReader(ConcurrentReferenceCachingMetadataReaderFactory.java:75) ~[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:81) ~[spring-core-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.asSourceClass(ConfigurationClassParser.java:685) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser$SourceClass.getSuperClass(ConfigurationClassParser.java:998) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:332) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:242) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:191) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass(ConfigurationClassParser.java:295) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:242) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:199) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:167) ~[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
... 18 common frames omitted
Disconnected from the target VM, address: '127.0.0.1:64543', transport: 'socket'
出错 的项目结构
讲appliction.java放入自定义包中
启动
成功了
边栏推荐
- 6095. Strong password checker II
- 2278. 字母在字符串中的百分比
- For the problem that Folium map cannot be displayed, the temporary solution is as follows
- How to use percona tool to add fields to MySQL table after interruption
- matlab中wavedec2,说说wavedec2函数[通俗易懂]
- /bin/ld: 找不到 -lcrypto
- 爱可可AI前沿推介(7.2)
- 6095. 强密码检验器 II
- 如何实现十亿级离线 CSV 导入 Nebula Graph
- HMS core machine learning service helps zaful users to shop conveniently
猜你喜欢
《大学“电路分析基础”课程实验合集.实验五》丨线性有源二端网络等效电路的研究
[leetcode] 1905 statistics sub Island
XPT2046 四线电阻式触摸屏
Comment réaliser un graphique Nebula d'importation CSV hors ligne de niveau milliard
已知兩種遍曆序列構造二叉樹
【Salesforce】如何确认你的Salesforce版本?
Aiko ai Frontier promotion (7.2)
Teach you how to build virtual machines locally and deploy microservices
Comparison between rstan Bayesian regression model and standard linear regression model of R language MCMC
《大学“电路分析基础”课程实验合集.实验四》丨线性电路特性的研究
随机推荐
6096. 咒语和药水的成功对数
win10系统升级一段时间后,内存占用过高
Thoroughly understand browser strong cache and negotiation cache
/Bin/ld: cannot find -llz4
《大学“电路分析基础”课程实验合集.实验四》丨线性电路特性的研究
(万字精华知识总结)Shell脚本编程基础知识
[leetcode] 1162 map analysis
PTA ladder game exercise set l2-001 inter city emergency rescue
[leetcode] 19 delete the penultimate node of the linked list
Application of visualization technology in Nebula graph
GraphX 图计算实践之模式匹配抽取特定子图
Digital collection system development (program development) - Digital Collection 3D modeling economic model system development source code
智联招聘的基于 Nebula Graph 的推荐实践分享
《大学“电路分析基础”课程实验合集.实验六》丨典型信号的观察与测量
Analysis of the difference between array and linked list
Cultural scores of summer college entrance examination
数据库系统概论第一章简答题-期末考得怎么样?
Target detection - make your own deep learning target detection data set with labelimg
Aike AI frontier promotion (7.2)
全是精华的模电专题复习资料:基本放大电路知识点