【发布时间】:2018-02-14 13:15:45
【问题描述】:
首先,我没有使用 Maven,因为 Maven 插件没有安装到我的 Eclipse 中。它抛出 502 异常代码。然后我尝试创建一个动态web项目并在lib下添加spring jars(Context、Core、Webmvc)并配置为构建路径。
然后我创建了一个 Config 类,但是它抛出了
The type org.springframework.beans.factory.support.BeanNameGenerator cannot be resolved. It is indirectly referenced from required .class files
我用谷歌搜索了它,但每个人都指的是有 spring 上下文 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 {
}
【问题讨论】:
标签: java spring eclipse maven spring-mvc