【发布时间】:2015-10-08 00:49:56
【问题描述】:
如何保证Spring Security>3.2.1按照这个documented、bug使用?:
class path resource [org/springframework/security/config/annotation/authentication/configurers/GlobalAuthenticationConfigurerAdapter.class]
cannot be opened because it does not exist
我在POM.xml 中尝试了upgrading it,但没有成功(Intellij 抱怨该版本不存在):
我在 Intellij Maven 设置中的本地存储库路径是正确的。我将鼠标悬停在它的投诉上并选择“更新 Maven 索引”。它尝试更新我的本地存储库,只返回不存在的依赖项。
那么,我还能如何确保找到 GlobalAuthenticationConfigurerAdapter.class?
【问题讨论】:
-
对于初学者,请发布您的 POM,但应该这样做。您可能需要特别依赖相关的实际包,而不仅仅是间接依赖。
-
使用
spring-boot-starter-security具有所有正确依赖项的依赖项。也没有 Spring 安全版本 4.0.2,最新的是 4.0.1。但你真的应该使用启动器,而不是自己尝试找出有效的依赖版本。 -
@M.Deinum 你能回答这个问题吗?这是实际的解决方案。
标签: java spring maven spring-mvc intellij-idea