开放文档逻辑修改
This commit is contained in:
@@ -46,7 +46,12 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
|||||||
protected void configure(HttpSecurity http) throws Exception {
|
protected void configure(HttpSecurity http) throws Exception {
|
||||||
String loginPage = "/static/manage/login.html";
|
String loginPage = "/static/manage/login.html";
|
||||||
|
|
||||||
http.authorizeRequests().antMatchers("/login/**").permitAll()//为了测试其他功能,设置“ /** ”允许所有请求
|
http.authorizeRequests()
|
||||||
|
.antMatchers(
|
||||||
|
"/login/**", "/open-doc.html",
|
||||||
|
"/webjars/open-doc/**", "/swagger-mg-ui/open-doc/**",
|
||||||
|
"/webjars/zui/**", "/webjars/vue/**"
|
||||||
|
).permitAll()//为了测试其他功能,设置“ /** ”允许所有请求
|
||||||
.antMatchers("/document.html", "/doc.html").hasAuthority("DOC_ALL")
|
.antMatchers("/document.html", "/doc.html").hasAuthority("DOC_ALL")
|
||||||
// 其他地址的访问均需登录
|
// 其他地址的访问均需登录
|
||||||
.anyRequest().authenticated().and()
|
.anyRequest().authenticated().and()
|
||||||
|
|||||||
@@ -34,6 +34,11 @@ public class MgOpenDocController {
|
|||||||
@Resource
|
@Resource
|
||||||
private MgStorageService storageService;
|
private MgStorageService storageService;
|
||||||
|
|
||||||
|
@PostMapping(value = "/checkConfig")
|
||||||
|
public DocResponseJson<Object> checkConfig() {
|
||||||
|
return DocResponseJson.ok();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author 暮光:城中城
|
* @author 暮光:城中城
|
||||||
* @since 2019年1月27日
|
* @since 2019年1月27日
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ var Formatjson = {
|
|||||||
if (obj.length == 0) {
|
if (obj.length == 0) {
|
||||||
html += this.getRow(indent, "<span class='array-brace'>[ ]</span>" + comma, isPropertyContent);
|
html += this.getRow(indent, "<span class='array-brace'>[ ]</span>" + comma, isPropertyContent);
|
||||||
} else {
|
} else {
|
||||||
var clpsHtml = '<span><img class="option-img" src="webjars/mg-ui/img/expanded.png" onClick="Formatjson.expImgClicked(this);" /></span><span class="collapsible">';
|
var clpsHtml = '<span><img class="option-img" src="webjars/open-doc/img/expanded.png" onClick="Formatjson.expImgClicked(this);" /></span><span class="collapsible">';
|
||||||
var annotation = '';
|
var annotation = '';
|
||||||
if(showAnnotation && isNotEmpty(keyName) && isNotEmpty(this.annotationObject[keyName])) {
|
if(showAnnotation && isNotEmpty(keyName) && isNotEmpty(this.annotationObject[keyName])) {
|
||||||
annotation = '<span class="annotation">// '+this.annotationObject[keyName]+'</span>';
|
annotation = '<span class="annotation">// '+this.annotationObject[keyName]+'</span>';
|
||||||
@@ -48,7 +48,7 @@ var Formatjson = {
|
|||||||
if (numProps == 0) {
|
if (numProps == 0) {
|
||||||
html += this.getRow(indent, "<span class='object-brace'>{ }</span>" + comma, isPropertyContent);
|
html += this.getRow(indent, "<span class='object-brace'>{ }</span>" + comma, isPropertyContent);
|
||||||
} else {
|
} else {
|
||||||
var clpsHtml = '<span><img class="option-img" src="webjars/mg-ui/img/expanded.png" onClick="Formatjson.expImgClicked(this);" /></span><span class="collapsible">';
|
var clpsHtml = '<span><img class="option-img" src="webjars/open-doc/img/expanded.png" onClick="Formatjson.expImgClicked(this);" /></span><span class="collapsible">';
|
||||||
var annotation = '';
|
var annotation = '';
|
||||||
if(showAnnotation && isNotEmpty(keyName) && isNotEmpty(this.annotationObject[keyName])) {
|
if(showAnnotation && isNotEmpty(keyName) && isNotEmpty(this.annotationObject[keyName])) {
|
||||||
annotation = '<span class="annotation">// '+this.annotationObject[keyName]+'</span>';
|
annotation = '<span class="annotation">// '+this.annotationObject[keyName]+'</span>';
|
||||||
@@ -80,10 +80,10 @@ var Formatjson = {
|
|||||||
var container = img.parentNode.nextSibling;
|
var container = img.parentNode.nextSibling;
|
||||||
if(!container) return;
|
if(!container) return;
|
||||||
var disp = "none";
|
var disp = "none";
|
||||||
var src = "webjars/mg-ui/img/collapsed.png";
|
var src = "webjars/open-doc/img/collapsed.png";
|
||||||
if(container.style.display == "none"){
|
if(container.style.display == "none"){
|
||||||
disp = "inline";
|
disp = "inline";
|
||||||
src = "webjars/mg-ui/img/expanded.png";
|
src = "webjars/open-doc/img/expanded.png";
|
||||||
}
|
}
|
||||||
container.style.display = disp;
|
container.style.display = disp;
|
||||||
img.src = src;
|
img.src = src;
|
||||||
|
|||||||
@@ -46,7 +46,8 @@ var rightContentTabs;
|
|||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
globalLoadingMessager = new $.zui.Messager({type: 'primary', close: false, time: 0}).show();
|
globalLoadingMessager = new $.zui.Messager({type: 'primary', close: false, time: 0}).show();
|
||||||
showGlobalLoadingMessage('检查服务中,请稍候...', true);
|
showGlobalLoadingMessage('检查服务中,请稍候...', true);
|
||||||
ajaxTemp("swagger-mg-ui/storage/checkConfig", "post", "json", {
|
// open-doc:请求地址不同
|
||||||
|
ajaxTemp("swagger-mg-ui/open-doc/checkConfig", "post", "json", {
|
||||||
}, function(json){
|
}, function(json){
|
||||||
}, function(msg){
|
}, function(msg){
|
||||||
}, function (xhr) {
|
}, function (xhr) {
|
||||||
|
|||||||
Reference in New Issue
Block a user