错误优化

This commit is contained in:
暮光:城中城
2019-06-27 22:56:40 +08:00
parent f144e77035
commit eb7112b956
7 changed files with 36 additions and 31 deletions

View File

@@ -21,7 +21,7 @@
<timezone>2018-05-22 16:06:06</timezone>
</developer>
</developers>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
@@ -77,12 +77,12 @@
<version>${zyplayer.doc.version}</version>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<zyplayer.doc.version<version>1.0.2</version>zyplayer.doc.version>
<zyplayer.doc.version>1.0.2</zyplayer.doc.version>
<!-- 打包跳过单元测试 -->
<skipTests>true</skipTests>
<destDir>${project.build.outputDirectory}/META-INF/resources/webjars/${project.artifactId}/${project.version}</destDir>
@@ -233,4 +233,4 @@
</build>
</profile>
</profiles>
</project>
</project>

View File

@@ -111,16 +111,21 @@ public class DubboController {
@PostMapping(value = "/reloadService")
public DocResponseJson loadService() throws Exception {
List<DubboInfo> providerList;
if (StringUtils.isBlank(serviceZookeeperUrl)) {
if (StringUtils.isBlank(nacosUrl) || StringUtils.isBlank(nacosService)) {
return DocResponseJson.warn("zyplayer.doc.dubbo.zookeeper.url、zyplayer.doc.dubbo.nacos.url 参数均未配置");
try {
if (StringUtils.isBlank(serviceZookeeperUrl)) {
if (StringUtils.isBlank(nacosUrl) || StringUtils.isBlank(nacosService)) {
return DocResponseJson.warn("zyplayer.doc.dubbo.zookeeper.url、zyplayer.doc.dubbo.nacos.url 参数均未配置");
}
logger.info("zookeeper参数未配置使用nacos配置");
providerList = this.getDubboInfoByNacos();
} else {
providerList = this.getDubboInfoByZookeeper();
}
logger.info("zookeeper参数未配置使用nacos配置");
providerList = this.getDubboInfoByNacos();
} else {
providerList = this.getDubboInfoByZookeeper();
mgDubboStorageService.put(StorageKeys.DUBBO_SERVICE_LIST, JSON.toJSONString(providerList));
} catch (Exception e) {
e.printStackTrace();
return DocResponseJson.warn("获取服务列表失败");
}
mgDubboStorageService.put(StorageKeys.DUBBO_SERVICE_LIST, JSON.toJSONString(providerList));
return DocResponseJson.ok();
}

View File

@@ -118,13 +118,13 @@
<dependency>
<groupId>com.zyplayer</groupId>
<artifactId>zyplayer-doc-swagger</artifactId>
<version>${zyplayer.doc.swagger.version}</version>
<version>${zyplayer.doc.version}</version>
</dependency>
<!--zyplayer-doc-swagger-->
<dependency>
<groupId>com.zyplayer</groupId>
<artifactId>doc-console-page</artifactId>
<version>${zyplayer.doc.swagger.version}</version>
<artifactId>console-page</artifactId>
<version>${zyplayer.doc.version}</version>
</dependency>
<!--swagger-bootstrap-ui-->
<dependency>

View File

@@ -2,10 +2,10 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.zyplayer</groupId>
<artifactId>doc-console-page</artifactId>
<artifactId>console-page</artifactId>
<version>1.0.2</version>
<description>管理页面前端</description>
<url>https://gitee.com/zyplayer/zyplayer-doc</url>
@@ -20,19 +20,19 @@
<timezone>2018-05-22 16:06:06</timezone>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<zyplayer.doc.version<version>1.0.2</version>zyplayer.doc.version>
<zyplayer.doc.version>1.0.2</zyplayer.doc.version>
<!-- 打包跳过单元测试 -->
<skipTests>true</skipTests>
<destDir>${project.build.outputDirectory}/META-INF/resources/webjars/${project.artifactId}/${project.version}</destDir>
</properties>
<dependencies>
</dependencies>
<licenses>
<license>
@@ -45,7 +45,7 @@
<developerConnection>scm:git@git.oschina.net:zyplayer/zyplayer-doc.git</developerConnection>
<url>git@git.oschina.net:zyplayer/zyplayer-doc.git</url>
</scm>
<distributionManagement>
<snapshotRepository>
<id>snapshots</id>
@@ -56,7 +56,7 @@
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
</distributionManagement>
<build>
<resources>
<resource>

View File

@@ -2,9 +2,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<groupId>com.zyplayer</groupId>
<artifactId>doc-page</artifactId>
<artifactId>zyplayer-doc-page</artifactId>
<version>1.0.2</version>
<modelVersion>4.0.0</modelVersion>
<packaging>pom</packaging>
@@ -13,4 +13,4 @@
<module>console-page</module>
</modules>
</project>
</project>

View File

@@ -73,9 +73,9 @@
支持多项目同时展示,多种文档目录的展示方案,多种自定义配置,满足各种使用习惯。
本项目是完全从头写的所以有任何属性未解析到、UI上有何建议都能及时处理得到。
使用中您有任何的意见和建议都可到源码地址处反馈哦!<br/>
源码地址:<a target="_blank" href="https://gitee.com/zyplayer/zyplayer-doc">zyplayer-doc-swagger</a>(还有其他很多功能哦)
前端框架:<a target="_blank" href="http://zui.sexy">zui</a>(很不错)
我的网站:<a target="_blank" href="http://kongjianzhou.com">空间轴</a><a target="_blank" href="http://zyplayer.com">自由发挥</a>(都已很久未维护)<br/>
源码地址:<a target="_blank" href="https://gitee.com/zyplayer/zyplayer-doc">zyplayer-doc-swagger</a>
前端框架:<a target="_blank" href="http://zui.sexy">zui</a>
我的网站:<a target="_blank" href="http://kongjianzhou.com">空间轴</a><a target="_blank" href="http://zyplayer.com">自由发挥</a><br/>
<div id="upgradeInfoBox"></div>
</div>
</div>

View File

@@ -68,7 +68,7 @@
<label><input type="radio" name="forceRewriteDomain" value="1" v-model="forceRewriteDomain"></label>
<label><input type="radio" name="forceRewriteDomain" value="0" v-model="forceRewriteDomain"></label>
</td>
<td>文档在本地,想调试线上接口就可以勾选此参数,“在线调试”处的请求地址强制改为:“文档地址管理”处配置的重写域名+接口地址</td>
<td>文档在本地,想调试线上接口就可以勾选此参数,这样“在线调试”处的请求地址就会被强制改为:“文档地址管理”处配置的重写域名+接口地址</td>
</tr>
</tbody>
</table>
@@ -108,7 +108,7 @@
}
},
methods: {
},
mounted: function(){
getStorage(cacheKeys.userSettings, function(data){