首先,我没有使用Maven,因为Maven插件没有安装到我的Eclipse中。它抛出502异常代码。然后我尝试创建一个动态Web项目,并在lib下添加了spring jar(Context,Core,Webmvc)并配置为构建路径。
然后我创建了一个Config类,但它抛出了
The type org.springframework.beans.factory.support.BeanNameGenerator cannot be resolved. It is indirectly referenced from required .class files
我用Google搜索了,但是每个人都指的是有春天背景的jar。还有什么可以遗漏?
我的简单代码
package com.sbf.config;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
@Configuration
@EnableWebMvc
@ComponentScan(basePackages = "com.sbf.spring")
public class AppConfig {
}
答案 0 :(得分:0)
它在spring-beans
jar中。尝试在依赖项中添加它