老师你好,main 函数直接放在了java 目录之下 报错了 Application 放到包里面@ComponentScan这个注解又会失效
来源:10-3 返回cookies信息的get接口开发

慕田峪8226962
2020-01-30
在stack overflow有人说:Your code is in the default package, i.e. you have .java files in src/main/java with no package statement at the top. There’s a warning message in the log indicating that this is likely to cause problems: ** WARNING ** : Your ApplicationContext is unlikely to start due to a @ComponentScan of the default package.
我把Application.java丢到包里面了,就到这个注释@ComponentScan报错了,就算去掉括号的内容也不行。
写回答
1回答
-
大周
2020-02-07
往后学,后边就不用这种方式了。 这个就是一个过渡,把注解部分作为拆解,让你多理解一下。
00
相似问题