簡體   English   中英

配置Spring Security 4.2.1時出錯

[英]Error when configuring Spring security 4.2.1

我試圖使用Spring 4聲明性地配置Spring安全性。我創建了文件applicationContext-security.xml,如下圖所示。

applicationContext-security

當我運行應用程序時,我仍然遇到類似的錯誤

Failed to instantiate [org.springframework.security.config.SecurityNamespaceHandler]: Constructor threw exception. Check Error Log for more details.

有人已經面對過這個問題嗎? 您能幫我解決這個問題嗎? 提前致謝。

也許您添加了多個版本的spring secuirty檢查您的依賴關系,我遇到了這個問題,並通過刪除其他依賴關系解決了這個問題。

缺少spring-aop

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-aop</artifactId>
    <version>4.3.5.RELEASE</version>
</dependency>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM