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 existat 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 existat 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 omittedDisconnected from the target VM, address: '127.0.0.1:64543', transport: 'socket'

出错 的项目结构

 讲appliction.java放入自定义包中

启动

成功了 

解决** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the defau相关推荐

  1. 解决: Your ApplicationContext is unlikely to start due to a @ComponentScan of the default

    前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家.点击跳转到教程. 用 springboot 搭一个小应用 报错: Your ApplicationContext is ...

  2. spring boot 报错:Your ApplicationContext is unlikely to start due to a @ComponentScan of the default p

    ** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default ...

  3. Your ApplicationContext is unlikely tostart due to a @ComponentScan of the defau

    一.错误提示: Your ApplicationContext is unlikely tostart due to a @ComponentScan of the default package.. ...

  4. 成功解决WARNING: Ignoring invalid distribution -illow (E:\program files\python\python36\lib\site-package

    成功解决WARNING: Ignoring invalid distribution -illow (E:\program files\python\python36\lib\site-package ...

  5. 成功解决WARNING:tensorflow:From :read_data_sets (from tensorflow.contrib.learn.python.learn.

    成功解决WARNING:tensorflow:From :read_data_sets (from tensorflow.contrib.learn.python.learn. 目录 解决问题 解决思 ...

  6. 成功解决WARNING: You do not appear to have an NVIDIA GPU supported by the 430.34 NVIDIA Linux graph

    成功解决WARNING: You do not appear to have an NVIDIA GPU supported by the 430.34      NVIDIA Linux graph ...

  7. 成功解决WARNING:tensorflow:Variable += will be deprecated. Use variable.assign_add if you want assignmen

    成功解决WARNING:tensorflow:Variable += will be deprecated. Use variable.assign_add if you want assignmen ...

  8. 解决Warning: Cannot modify header information - headers already sent b...

    解决Warning: require(E:\testwwwroot\cc06\wp-admin/wp-includes/compat.php) [function.require]: failed t ...

  9. 解决 warning C4003: “min”宏的实参不足

    解决 warning C4003: "min"宏的实参不足 使用Qt5.0.1 for ms2010编译一个工程,错误信息如下: d:\qt\qt5.0.1\5.0.1\msvc2 ...

最新文章

  1. 在js中使用createElement创建HTML对象和元素_无需整理
  2. Jdbc模版式写法与Spring-JdbcTemplate的比较
  3. 前端学习(2653):对比vue2中的实现
  4. 【jmeter】Include Controller控件Test Fragment的使用
  5. mysql 替换 汉字_MySQL替换文字
  6. vs2019安装rdlc_科学网—vs2019 完全安装到D盘 - 刘航宇的博文
  7. Spring学习之AOP
  8. 固高板卡mct2008调试轴回零_MCT2008-for-ges 固高所有GE运动控制卡的DEMO软件,用来测试板卡是否正常工作 matlab 238万源代码下载- www.pudn.com...
  9. 写论文:证明非线性系统的稳定性
  10. 手写一个识别旺旺/千牛,手机在线/电脑在线状态的小工具
  11. 工程图字体宋体仿宋_宋黑仿变各种字体的审美禀赋
  12. php中划弧线,cad画弧形的快捷键是什么?如何画弧形?
  13. 由于受到新冠疫情的影响,GDP同比增长率从2019年的6.1%下滑到了2.3%
  14. android retrofit实例,Retrofit2简单实例
  15. winrar 百度网盘_不冲百度网盘会员,如何在手机上打开网盘里的压缩包?
  16. Android APP中保持屏幕不自动灭屏的一种方法
  17. 2022-12-3 图形化界面工具 添加数据
  18. Qt植物大战僵尸实现修改阳光和无冷却
  19. 永不消逝的电波(四):从无线电角度揭秘定位劫持
  20. 风雨人生,自己撑伞=

热门文章

  1. 实践是检验真理的唯一标准!!LoopBack 设置案例!
  2. 机器学习可视化技术(Towards Data Science)
  3. 将一根木棍分成三段,求这三段构成三角形的概率
  4. 远程访问操作mysql数据库
  5. 怎样快速对二进制和十进制进行互转化——IP地址规划与设计总结
  6. 实现用户自定义表单,自定义工作流
  7. c语言 json 请求_JSON的简单介绍以及C语言的JSON库使用
  8. Unity各版本差异
  9. 2018年最佳45 APM(应用程序性能监视和管理)工具
  10. CS144课程实验详解-lab0-第一部分