修改访问不了静态页面问题
This commit is contained in:
@@ -36,7 +36,7 @@ public class Application extends SpringBootServletInitializer {
|
||||
String urlCtx = hostAddress + ":" + serverPort + "/" + contextPath;
|
||||
logger.info("\n----------------------------------------------------------\n\t" +
|
||||
"\t\t地址列表\n\t" +
|
||||
"管理地址:http://{}statics/manage/home.html\n" +
|
||||
"管理地址:http://{}static/manage/home.html\n" +
|
||||
"----------------------------------------------------------",
|
||||
urlCtx
|
||||
);
|
||||
|
||||
@@ -39,12 +39,12 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
*/
|
||||
@Override
|
||||
public void configure(WebSecurity web) throws Exception {
|
||||
web.ignoring().antMatchers("/statics/lib/**", "/css/**", "/js/**", "/img/**");
|
||||
web.ignoring().antMatchers("/static/lib/**", "/css/**", "/js/**", "/img/**");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configure(HttpSecurity http) throws Exception {
|
||||
String loginPage = "/statics/manage/login.html";
|
||||
String loginPage = "/static/manage/login.html";
|
||||
|
||||
http.authorizeRequests().antMatchers("/login/**").permitAll()//为了测试其他功能,设置“ /** ”允许所有请求
|
||||
.antMatchers("/document.html", "/doc.html").hasAuthority("DOC_ALL")
|
||||
@@ -135,4 +135,4 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
return myFilter;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user