Spring Security NoClassDefFoundError

后端 未结 4 1666
谎友^
谎友^ 2021-01-12 00:05

Working on a Spring project and am learning to use Spring Security. The project was working but has suddenly decided no to. Can anyone shed some light as to why?

Web

相关标签:
4条回答
  • 2021-01-12 00:25

    Add dependency

        <dependency>
            <groupId>org.springframework.security</groupId>
            <artifactId>spring-security-web</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>
    

    Or gradle

    dependencies {  
      compile 'org.springframework.security:spring-security-web:4.0.1.RELEASE'
    }
    
    0 讨论(0)
  • 2021-01-12 00:39

    WebInvocationPrivilegeEvaluator interface is present in

    org.springframework.security.web.access package

    spring-security-web-5.0.4.RELEASE.jar

    Remove the existing jar files from .m2 folder and make a fresh build..

    C:\Users\user.m2\repository\org\springframework\security\spring-security-web\5.0.4.RELEASE

    I used version 5.., in your case 4..

    It worked in my case, my problem has resolved

    0 讨论(0)
  • 2021-01-12 00:40

    for me I solved it by adding this dependancy :

    <dependency>
                <groupId>org.springframework.security</groupId>
                <artifactId>spring-security-messaging</artifactId>
            </dependency>
    
    0 讨论(0)
  • 2021-01-12 00:43

    Please add this org.springframework.security spring-security-web 4.0.1.RELEASE

    0 讨论(0)
提交回复
热议问题