修改访问不了静态页面问题
This commit is contained in:
@@ -36,7 +36,7 @@ public class Application extends SpringBootServletInitializer {
|
|||||||
String urlCtx = hostAddress + ":" + serverPort + "/" + contextPath;
|
String urlCtx = hostAddress + ":" + serverPort + "/" + contextPath;
|
||||||
logger.info("\n----------------------------------------------------------\n\t" +
|
logger.info("\n----------------------------------------------------------\n\t" +
|
||||||
"\t\t地址列表\n\t" +
|
"\t\t地址列表\n\t" +
|
||||||
"管理地址:http://{}statics/manage/home.html\n" +
|
"管理地址:http://{}static/manage/home.html\n" +
|
||||||
"----------------------------------------------------------",
|
"----------------------------------------------------------",
|
||||||
urlCtx
|
urlCtx
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -39,12 +39,12 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void configure(WebSecurity web) throws Exception {
|
public void configure(WebSecurity web) throws Exception {
|
||||||
web.ignoring().antMatchers("/statics/lib/**", "/css/**", "/js/**", "/img/**");
|
web.ignoring().antMatchers("/static/lib/**", "/css/**", "/js/**", "/img/**");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void configure(HttpSecurity http) throws Exception {
|
protected void configure(HttpSecurity http) throws Exception {
|
||||||
String loginPage = "/statics/manage/login.html";
|
String loginPage = "/static/manage/login.html";
|
||||||
|
|
||||||
http.authorizeRequests().antMatchers("/login/**").permitAll()//为了测试其他功能,设置“ /** ”允许所有请求
|
http.authorizeRequests().antMatchers("/login/**").permitAll()//为了测试其他功能,设置“ /** ”允许所有请求
|
||||||
.antMatchers("/document.html", "/doc.html").hasAuthority("DOC_ALL")
|
.antMatchers("/document.html", "/doc.html").hasAuthority("DOC_ALL")
|
||||||
|
|||||||
@@ -1,30 +1,14 @@
|
|||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
name: zyplayer-doc-manage
|
name: zyplayer-doc-manage
|
||||||
velocity:
|
# mvc:
|
||||||
layout-url: common/default.vm
|
# static-path-pattern: /**
|
||||||
cache: false
|
|
||||||
suffix: .vm
|
|
||||||
expose-spring-macro-helpers: true
|
|
||||||
date-tool-attribute: dateTool
|
|
||||||
number-tool-attribute: numberTool
|
|
||||||
contentType: text/html;charset=UTF-8
|
|
||||||
resource-loader-path: classpath:/vm/
|
|
||||||
default-content-type: text/html
|
|
||||||
ignore-accept-header: true
|
|
||||||
charset: UTF-8
|
|
||||||
properties:
|
|
||||||
input:
|
|
||||||
encoding: UTF-8
|
|
||||||
output:
|
|
||||||
encoding: UTF-8
|
|
||||||
|
|
||||||
server:
|
server:
|
||||||
port: 8082
|
port: 8082
|
||||||
servlet:
|
servlet:
|
||||||
context-path: /zyplayer-doc-manage
|
context-path: /zyplayer-doc-manage
|
||||||
|
|
||||||
|
|
||||||
zyplayer:
|
zyplayer:
|
||||||
doc:
|
doc:
|
||||||
# zyplayer_doc_manage管理端的数据库配置
|
# zyplayer_doc_manage管理端的数据库配置
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 290 KiB After Width: | Height: | Size: 290 KiB |
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 290 KiB After Width: | Height: | Size: 290 KiB |
Reference in New Issue
Block a user