0
我下面這個github project熟悉自己使用Spring Security。我已經啓動並運行了該項目。我對OAuth2ServerConfiguration.java文件進行了小小的修改,嘗試訪問控制器並驗證其他所有內容。我不知道是否有可能與2條規則或不能做到這一點,這裏是有問題的代碼:以上Spring Security的4 - 允許訪問控制和鑑定拍賣品
@Override
public void configure(HttpSecurity http) throws Exception {
// @formatter:off
http
.authorizeRequests()
.antMatchers("/homecontroller").permitAll()
.antMatchers("/greeting").authenticated();
// @formatter:on
}
的代碼工作正常,當我改變"/greeting"
到/**
,一切都需要驗證。