修改访问不了静态页面问题
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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,30 +1,14 @@
|
||||
spring:
|
||||
application:
|
||||
name: zyplayer-doc-manage
|
||||
velocity:
|
||||
layout-url: common/default.vm
|
||||
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
|
||||
# mvc:
|
||||
# static-path-pattern: /**
|
||||
|
||||
server:
|
||||
port: 8082
|
||||
servlet:
|
||||
context-path: /zyplayer-doc-manage
|
||||
|
||||
|
||||
zyplayer:
|
||||
doc:
|
||||
# zyplayer_doc_manage管理端的数据库配置
|
||||
@@ -74,8 +58,8 @@ mybatis-plus:
|
||||
configuration:
|
||||
map-underscore-to-camel-case: true
|
||||
cache-enabled: false
|
||||
|
||||
|
||||
|
||||
|
||||
#一些测试地址
|
||||
#https://gitee.com/GeekPerson/central-platform 项目的文档
|
||||
#http://47.99.88.28:9200/swagger-resources
|
||||
#http://47.99.88.28:9200/swagger-resources
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
<body>
|
||||
<title>403错误页面</title>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
<body>
|
||||
<title>403错误页面</title>
|
||||
<style>
|
||||
</style>
|
||||
<div style="text-align: center;">您没有权限访问此页面</div>
|
||||
</body>
|
||||
</style>
|
||||
<div style="text-align: center;">您没有权限访问此页面</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,14 +1,14 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
<body>
|
||||
<title>404错误页面</title>
|
||||
<style>
|
||||
</style>
|
||||
<div style="text-align: center;">您访问的页面不存在</div>
|
||||
</body>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
<body>
|
||||
<title>404错误页面</title>
|
||||
<style>
|
||||
</style>
|
||||
<div style="text-align: center;">您访问的页面不存在</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,14 +1,14 @@
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
<body>
|
||||
<title>500错误页面</title>
|
||||
<style>
|
||||
</style>
|
||||
<div style="text-align: center;">服务器错误</div>
|
||||
</body>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
</head>
|
||||
<body>
|
||||
<title>500错误页面</title>
|
||||
<style>
|
||||
</style>
|
||||
<div style="text-align: center;">服务器错误</div>
|
||||
</body>
|
||||
</html>
|
||||
|
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 |
@@ -1,80 +1,80 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>登录</title>
|
||||
<link rel="stylesheet" type="text/css" href="../lib/mzui/css/mzui.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app">
|
||||
<div class="page fade scale-from-center display in" style="overflow: hidden">
|
||||
<div class="dock blur-lg" style="background: url('../lib/mzui/img/loginBg.jpg') no-repeat center; background-size: cover; top: -2rem; right: -2rem; bottom: -2rem; left: -2rem"></div>
|
||||
<div class="dock flex flex-center">
|
||||
<div class="modal rounded" style="width: 18rem; height: 10rem; margin: auto;">
|
||||
<div class="heading divider primary-pale">
|
||||
<div class="title">登录 <span class="reason"> 您没有权限访问该内容或需要登录</span></div>
|
||||
</div>
|
||||
|
||||
<div class="content box">
|
||||
<div class="control has-label-left"><!-- has-error -->
|
||||
<input type="text" name="username" class="input" v-model="userId" placeholder="用户名">
|
||||
<label for="account"><i class="icon-user"></i></label>
|
||||
<div class="help-text" v-if="errorInfo.length > 0">{{errorInfo}}</div>
|
||||
</div>
|
||||
<div class="control has-label-left">
|
||||
<input type="password" name="password" v-model="password" class="input" placeholder="密码">
|
||||
<input type="hidden" name="validateCode" value="1234">
|
||||
<label for="account"><i class="icon-key"></i></label>
|
||||
</div>
|
||||
<div class="control">
|
||||
<button type="submit" v-on:click="loginSubmit" class="btn block primary">登录</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="../lib/jquery/jquery-3.1.0.min.js"></script>
|
||||
<script src="../lib/mzui/js/mzui.min.js"></script>
|
||||
<script src="../lib/vue/vue.js"></script>
|
||||
<script src="../lib/mg/js/common.js"></script>
|
||||
|
||||
<script>
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
userId: "",
|
||||
password: "",
|
||||
errorInfo: ""
|
||||
},
|
||||
methods: {
|
||||
loginSubmit: function() {
|
||||
var param = {
|
||||
username: app.userId,
|
||||
password: app.password,
|
||||
validateCode: "1234"
|
||||
};
|
||||
post(ctx + "login", param, function(result) {
|
||||
console.log(result);
|
||||
if(result.errCode == 200) {
|
||||
location.href = result.data;
|
||||
} else {
|
||||
alert("登录失败," + result.errMsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>登录</title>
|
||||
<link rel="stylesheet" type="text/css" href="../lib/mzui/css/mzui.min.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app">
|
||||
<div class="page fade scale-from-center display in" style="overflow: hidden">
|
||||
<div class="dock blur-lg" style="background: url('../lib/mzui/img/loginBg.jpg') no-repeat center; background-size: cover; top: -2rem; right: -2rem; bottom: -2rem; left: -2rem"></div>
|
||||
<div class="dock flex flex-center">
|
||||
<div class="modal rounded" style="width: 18rem; height: 10rem; margin: auto;">
|
||||
<div class="heading divider primary-pale">
|
||||
<div class="title">登录 <span class="reason"> 您没有权限访问该内容或需要登录</span></div>
|
||||
</div>
|
||||
|
||||
<div class="content box">
|
||||
<div class="control has-label-left"><!-- has-error -->
|
||||
<input type="text" name="username" class="input" v-model="userId" placeholder="用户名">
|
||||
<label for="account"><i class="icon-user"></i></label>
|
||||
<div class="help-text" v-if="errorInfo.length > 0">{{errorInfo}}</div>
|
||||
</div>
|
||||
<div class="control has-label-left">
|
||||
<input type="password" name="password" v-model="password" class="input" placeholder="密码">
|
||||
<input type="hidden" name="validateCode" value="1234">
|
||||
<label for="account"><i class="icon-key"></i></label>
|
||||
</div>
|
||||
<div class="control">
|
||||
<button type="submit" v-on:click="loginSubmit" class="btn block primary">登录</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="../lib/jquery/jquery-3.1.0.min.js"></script>
|
||||
<script src="../lib/mzui/js/mzui.min.js"></script>
|
||||
<script src="../lib/vue/vue.js"></script>
|
||||
<script src="../lib/mg/js/common.js"></script>
|
||||
|
||||
<script>
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data: {
|
||||
userId: "",
|
||||
password: "",
|
||||
errorInfo: ""
|
||||
},
|
||||
methods: {
|
||||
loginSubmit: function() {
|
||||
var param = {
|
||||
username: app.userId,
|
||||
password: app.password,
|
||||
validateCode: "1234"
|
||||
};
|
||||
post(ctx + "login", param, function(result) {
|
||||
console.log(result);
|
||||
if(result.errCode == 200) {
|
||||
location.href = result.data;
|
||||
} else {
|
||||
alert("登录失败," + result.errMsg);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.reason{color: #f00;font-size: 12px;}
|
||||
</style>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user