2015-12-05 35 views
5

Sau khi nâng cấp lên Kotlin 1.0.0-beta-3595 từ 1.0.0-beta-242 mã sau đây không biên dịch:Kotlin an ninh mùa xuân cấu hình

@Throws(Exception::class) 
override fun configure(http: HttpSecurity) 
{ 
    http.addFilterBefore(AuthenticationFilter(authenticationManager()), BasicAuthenticationFilter::class.java) 

    http.csrf().disable() 
      .sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS) 
      .and().authorizeRequests() 
      .antMatchers("/authorization/**", "/public/**").permitAll() 
      .antMatchers("/**").authenticated() 
} 

Lỗi trở là:

SecurityAssembly.kt: (48, 65): Unresolved reference: permitAll 

Edit:

Chữ ký của phương thức allowAll, từ khung bảo mật Spring Security phổ biến là:

public ExpressionInterceptUrlRegistry permitAll() { 
    return access(permitAll); 
} 

Tôi có thiếu thứ gì đó hay đây là lỗi không?

+1

Bạn có thể cung cấp chữ ký chức năng cho phépTất cả (trước khi nâng cấp) không? – mfulton26

+0

@ mfulton26 ah, vâng, tất nhiên rồi. thêm thx. –

Trả lời

1

Đây là lỗi trong Kotlin 1.0-beta3595 và đã là logged here.

Các vấn đề liên quan