【问题标题】:The type org.springframework.beans.factory.support.BeanNameGenerator cannot be resolved Without Mavenorg.springframework.beans.factory.support.BeanNameGenerator 类型无法在没有 Maven 的情况下解析
【发布时间】: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


    【解决方案1】:

    它在spring-beans 罐子里。尝试在您的依赖项中添加它

    【讨论】:

    • 完美的左侧。帮助了我
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-08-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-08-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多