卸载spring-security-ldap插件时出现问题

时间:2014-01-22 17:10:56

标签: grails spring-security grails-plugin

我有一种令人沮丧的情况,我无法理解。我正在使用Grails框架(版本:3.4.0.RELEASE)开发应用程序。我使用spring-security-core(1.2.7.3)和spring-security-ldap(1.0.6)插件来管理凭据。我卸载了ldap插件,由于某种原因它会导致错误。现在,当我尝试运行该项目时,它为我的一个groovy类提供了java错误,例如“... java:15:')'expected ...”或“... java:15:';'预期...”。在卸载ldap插件之前,一切都很顺利。在编译期间,它说“使用javac编译时编译错误”。这里发生了什么事?如果我需要显示其他代码,请告诉我。这是在运行时。没有错误显示。我急于完成项目,每次我遇到这个问题我只是创建一个新项目,它运行良好。我试图在项目进展中避免这种情况

编辑:

控制台输出

| Loading Grails 2.2.4
| Configuring classpath.
| Environment set to development.....
| Packaging Grails application....
| Compiling 21 source files.
| Error Compilation error: startup failed:
Compile error during compilation with javac.
C:\Users\cpu user\AppData\Local\Temp\groovy-generated-75457048637925996-java-source\com\example\ldap\MyUserDetails.java:15: ')' expected
super ((java.lang.String)null, (java.lang.String)null, false, false, false, false, (java.util.Collection<java.lang.Object extends org.springframework.security.core.GrantedAuthority>)null);
                                                                                                                         ^
C:\Users\cpu user\AppData\Local\Temp\groovy-generated-75457048637925996-java-source\com\example\ldap\MyUserDetails.java:15: ';' expected
super ((java.lang.String)null, (java.lang.String)null, false, false, false, false, (java.util.Collection<java.lang.Object extends org.springframework.security.core.GrantedAuthority>)null);
                                                                                                                                 ^
C:\Users\cpu user\AppData\Local\Temp\groovy-generated-75457048637925996-java-source\com\example\ldap\MyUserDetails.java:15: illegal start of expression
super ((java.lang.String)null, (java.lang.String)null, false, false, false, false, (java.util.Collection<java.lang.Object extends org.springframework.security.core.GrantedAuthority>)null);
                                                                                                                                     ^
C:\Users\cpu user\AppData\Local\Temp\groovy-generated-75457048637925996-java-source\com\example\ldap\MyUserDetails.java:15: ';' expected
super ((java.lang.String)null, (java.lang.String)null, false, false, false, false, (java.util.Collection<java.lang.Object extends org.springframework.security.core.GrantedAuthority>)null);
                                                                                                                                                     ^
C:\Users\cpu user\AppData\Local\Temp\groovy-generated-75457048637925996-java-source\com\example\ldap\MyUserDetails.java:15: illegal start of expression
super ((java.lang.String)null, (java.lang.String)null, false, false, false, false, (java.util.Collection<java.lang.Object extends org.springframework.security.core.GrantedAuthority>)null);
                                                                                                                                                                                     ^
C:\Users\cpu user\AppData\Local\Temp\groovy-generated-75457048637925996-java-source\com\example\ldap\MyUserDetails.java:15: not a statement
super ((java.lang.String)null, (java.lang.String)null, false, false, false, false, (java.util.Collection<java.lang.Object extends org.springframework.security.core.GrantedAuthority>)null);
                                                                                                                                                                                    ^
C:\Users\cpu user\AppData\Local\Temp\groovy-generated-75457048637925996-java-source\com\example\ldap\MyUserDetails.java:15: not a statement
super ((java.lang.String)null, (java.lang.String)null, false, false, false, false, (java.util.Collection<java.lang.Object extends org.springframework.security.core.GrantedAuthority>)null);
                                                                                                                                                                                      ^
C:\Users\cpu user\AppData\Local\Temp\groovy-generated-75457048637925996-java-source\com\example\ldap\MyUserDetails.java:15: ';' expected
super ((java.lang.String)null, (java.lang.String)null, false, false, false, false, (java.util.Collection<java.lang.Object extends org.springframework.security.core.GrantedAuthority>)null);
                                                                                                                                                                                          ^
C:\Users\cpu user\AppData\Local\Temp\groovy-generated-75457048637925996-java-source\com\example\ldap\MyUserDetails.java:15: cannot find symbol
symbol  : class util
location: package java
super ((java.lang.String)null, (java.lang.String)null, false, false, false, false, (java.util.Collection<java.lang.Object extends org.springframework.security.core.GrantedAuthority>)null);
                                                                                        ^
C:\Users\cpu user\AppData\Local\Temp\groovy-generated-75457048637925996-java-source\com\example\ldap\MyUserDetails.java:15: cannot find symbol
symbol  : class lang
location: package java
super ((java.lang.String)null, (java.lang.String)null, false, false, false, false, (java.util.Collection<java.lang.Object extends org.springframework.security.core.GrantedAuthority>)null);
                                                                                                             ^
C:\Users\cpu user\AppData\Local\Temp\groovy-generated-75457048637925996-java-source\com\example\ldap\MyUserDetails.java:15: cannot find symbol
symbol  : constructor User(java.lang.String,java.lang.String,boolean,boolean,boolean,boolean,boolean)
location: class org.springframework.security.core.userdetails.User
super ((java.lang.String)null, (java.lang.String)null, false, false, false, false, (java.util.Collection<java.lang.Object extends org.springframework.security.core.GrantedAuthority>)null);
^
C:\Users\cpu user\AppData\Local\Temp\groovy-generated-75457048637925996-java-source\com\example\ldap\MyUserDetails.java:15: package security does not exist
super ((java.lang.String)null, (java.lang.String)null, false, false, false, false, (java.util.Collection<java.lang.Object extends org.springframework.security.core.GrantedAuthority>)null);
                                                                                                                                                              ^
Note: C:\projects\new portal project\InfinityPortalIntranet\src\java\com\example\ldap\AuthenticateUser.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
12 errors`

编辑2: MyUserDetails.Groovy

package com.example.ldap

import org.springframework.security.core.GrantedAuthority
import org.springframework.security.core.userdetails.User

class MyUserDetails extends User {
    // extra instance variables
    final String fullname
    final String email
    final String title
    final String firstName
    final String lastName
    MyUserDetails(String username, String password, boolean enabled, boolean accountNonExpired, 
        boolean credentialsNonExpired, boolean accountNonLocked, 
        Collection<GrantedAuthority> authorities, 
        String fullname, String email, String title, String firstName, String lastName) {

        super(username, password, enabled, accountNonExpired, credentialsNonExpired, accountNonLocked, 
            authorities)

        this.fullname = fullname 
        this.email = email 
        this.title = title 
        this.firstName = firstName
        this.lastName = lastName
        }
}

0 个答案:

没有答案