mirror of https://gitee.com/maxjhandsome/pig
👷 Adding CI build system. 格式化代码
This commit is contained in:
parent
8626f087bb
commit
69e9c9db76
|
@ -0,0 +1,49 @@
|
|||
# This workflow will build a Java project with Maven
|
||||
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
|
||||
|
||||
name: PIG 构建action
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '11'
|
||||
distribution: 'adopt'
|
||||
|
||||
- name: mvn clean install
|
||||
run: mvn clean install
|
||||
|
||||
- name: mvn spring-javaformat:validate
|
||||
run: mvn spring-javaformat:validate
|
||||
|
||||
- name: success
|
||||
if: ${{ success() }}
|
||||
uses: fifsky/dingtalk-action@master
|
||||
with:
|
||||
url: ${{ secrets.DINGTALK_WEBHOOK}}
|
||||
type: markdown
|
||||
content: |
|
||||
# 💯👨💻 Success 🎉🎉🎉
|
||||
> Github Action: https://github.com/pig-mesh/pig success
|
||||
> ^_^ from github action message
|
||||
|
||||
- name: failure
|
||||
if: ${{ failure() }}
|
||||
uses: fifsky/dingtalk-action@master
|
||||
with:
|
||||
url: ${{ secrets.DINGTALK_WEBHOOK}}
|
||||
type: markdown
|
||||
content: |
|
||||
# 💤🤷♀️ failure 🙅♂️💣
|
||||
> Github Action: https://github.com/pig-mesh/pig failure
|
||||
> (⋟﹏⋞) from github action message
|
|
@ -53,9 +53,9 @@ public class GatewaySwaggerAutoConfiguration {
|
|||
}
|
||||
else {
|
||||
// 关闭时,返回404
|
||||
return RouterFunctions
|
||||
.route(RequestPredicates.GET("/swagger-ui/**").and(RequestPredicates.accept(MediaType.ALL)),
|
||||
serverRequest -> ServerResponse.notFound().build());
|
||||
return RouterFunctions.route(
|
||||
RequestPredicates.GET("/swagger-ui/**").and(RequestPredicates.accept(MediaType.ALL)),
|
||||
serverRequest -> ServerResponse.notFound().build());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -46,8 +46,7 @@ public class PigNacosApplication {
|
|||
private static boolean initEnv() {
|
||||
// 特殊处理 window 且用户名包含中文的用户,避免RocksDB 初始化失败
|
||||
// System.setProperty(SystemUtil.USER_HOME, "/nacos-path/");
|
||||
if (SystemUtil.getOsInfo().isWindows()
|
||||
&& Validator.hasChinese(SystemUtil.getUserInfo().getHomeDir())) {
|
||||
if (SystemUtil.getOsInfo().isWindows() && Validator.hasChinese(SystemUtil.getUserInfo().getHomeDir())) {
|
||||
log.error("路径包含中文,需要打开以上注释配置指定不包含中文目录");
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue