Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzou
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzou
提交
69db4815
提交
69db4815
编写于
5月 10, 2020
作者:
sq3536
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master'
上级
242896eb
5aea0c22
变更
13
隐藏空白字符变更
内嵌
并排
正在显示
13 个修改的文件
包含
27 行增加
和
51 行删除
+27
-51
config.xml
config.xml
+5
-5
Dockerfile
ibzou-app/ibzou-app-web/src/main/docker/Dockerfile
+1
-1
ibzou-app-web.yaml
ibzou-app/ibzou-app-web/src/main/docker/ibzou-app-web.yaml
+1
-3
application-web-dev.yml
.../ibzou-app-web/src/main/resources/application-web-dev.yml
+1
-1
application-web-prod.yml
...ibzou-app-web/src/main/resources/application-web-prod.yml
+1
-1
application-dev.yml
ibzou-boot/src/main/resources/application-dev.yml
+1
-1
Dockerfile
ibzou-provider/ibzou-provider-api/src/main/docker/Dockerfile
+1
-1
ibzou-provider-api.yaml
...bzou-provider-api/src/main/docker/ibzou-provider-api.yaml
+3
-1
SwaggerConfiguration.java
...rc/main/java/cn/ibizlab/swagger/SwaggerConfiguration.java
+9
-3
application-api-dev.yml
...u-provider-api/src/main/resources/application-api-dev.yml
+1
-1
application-api-prod.yml
...-provider-api/src/main/resources/application-api-prod.yml
+1
-1
PermissionSyncJob.java
.../src/main/java/cn/ibizlab/util/job/PermissionSyncJob.java
+1
-1
RemoteService.java
.../src/main/java/cn/ibizlab/util/service/RemoteService.java
+1
-31
未找到文件。
config.xml
浏览文件 @
69db4815
...
@@ -37,11 +37,11 @@
...
@@ -37,11 +37,11 @@
git clone -b master $para2 ibzou/
git clone -b master $para2 ibzou/
export NODE_OPTIONS=--max-old-space-size=4096
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzou/
cd ibzou/
mvn clean package -P
web
mvn clean package -P
api
cd ibzou-
app/ibzou-app-web
cd ibzou-
provider/ibzou-provider-api
mvn -P
web
docker:build
mvn -P
api
docker:build
mvn -P
web
docker:push
mvn -P
api
docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzou-
app-web.yaml ibzlab-rt --with-registry-auth
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzou-
provider-api.yaml ibzlab-rt --with-registry-auth
</command>
</command>
</hudson.tasks.Shell>
</hudson.tasks.Shell>
</builders>
</builders>
...
...
ibzou-app/ibzou-app-web/src/main/docker/Dockerfile
浏览文件 @
69db4815
...
@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
...
@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \
sleep ${IBZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzou-app-web.jar
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzou-app-web.jar
EXPOSE
30001
EXPOSE
8080
ADD
ibzou-app-web.jar /ibzou-app-web.jar
ADD
ibzou-app-web.jar /ibzou-app-web.jar
ibzou-app/ibzou-app-web/src/main/docker/ibzou-app-web.yaml
浏览文件 @
69db4815
...
@@ -3,11 +3,9 @@ services:
...
@@ -3,11 +3,9 @@ services:
ibzou-app-web
:
ibzou-app-web
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-app-web:latest
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-app-web:latest
ports
:
ports
:
-
"
30001:30001
"
-
"
8080:8080
"
networks
:
networks
:
-
agent_network
-
agent_network
environment
:
SPRING_CLOUD_NACOS_DISCOVERY_IP
:
172.16.180.237
deploy
:
deploy
:
mode
:
replicated
mode
:
replicated
replicas
:
1
replicas
:
1
...
...
ibzou-app/ibzou-app-web/src/main/resources/application-web-dev.yml
浏览文件 @
69db4815
server
:
server
:
port
:
30001
port
:
8080
\ No newline at end of file
\ No newline at end of file
ibzou-app/ibzou-app-web/src/main/resources/application-web-prod.yml
浏览文件 @
69db4815
server
:
server
:
port
:
30001
port
:
8080
#zuul网关路由设置
#zuul网关路由设置
zuul
:
zuul
:
...
...
ibzou-boot/src/main/resources/application-dev.yml
浏览文件 @
69db4815
server
:
server
:
port
:
8080
port
:
40001
ibzou-provider/ibzou-provider-api/src/main/docker/Dockerfile
浏览文件 @
69db4815
...
@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
...
@@ -9,6 +9,6 @@ CMD echo "The application will start in ${IBZ_SLEEP}s..." && \
sleep ${IBZ_SLEEP} && \
sleep ${IBZ_SLEEP} && \
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzou-provider-api.jar
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzou-provider-api.jar
EXPOSE
808
1
EXPOSE
4000
1
ADD
ibzou-provider-api.jar /ibzou-provider-api.jar
ADD
ibzou-provider-api.jar /ibzou-provider-api.jar
ibzou-provider/ibzou-provider-api/src/main/docker/ibzou-provider-api.yaml
浏览文件 @
69db4815
...
@@ -3,9 +3,11 @@ services:
...
@@ -3,9 +3,11 @@ services:
ibzou-provider-api
:
ibzou-provider-api
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-provider-api:latest
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzou-provider-api:latest
ports
:
ports
:
-
"
8081:808
1"
-
"
40001:4000
1"
networks
:
networks
:
-
agent_network
-
agent_network
environment
:
SPRING_CLOUD_NACOS_DISCOVERY_IP
:
172.16.180.237
deploy
:
deploy
:
mode
:
replicated
mode
:
replicated
replicas
:
1
replicas
:
1
...
...
ibzou-provider/ibzou-provider-api/src/main/java/cn/ibizlab/swagger/SwaggerConfiguration.java
浏览文件 @
69db4815
package
cn
.
ibizlab
.
swagger
;
package
cn
.
ibizlab
.
swagger
;
import
cn.ibizlab.util.security.SpringContextHolder
;
import
cn.ibizlab.util.security.SpringContextHolder
;
import
cn.ibizlab.util.web.IBZOperationParameterReader
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.context.annotation.Configuration
;
import
static
com
.
google
.
common
.
base
.
Predicates
.
or
;
import
static
springfox
.
documentation
.
builders
.
PathSelectors
.
regex
;
import
org.springframework.plugin.core.PluginRegistry
;
import
org.springframework.plugin.core.PluginRegistry
;
import
org.springframework.plugin.core.PluginRegistrySupport
;
import
org.springframework.plugin.core.PluginRegistrySupport
;
import
springfox.documentation.builders.ApiInfoBuilder
;
import
springfox.documentation.builders.ApiInfoBuilder
;
import
springfox.documentation.builders.PathSelectors
;
import
springfox.documentation.builders.PathSelectors
;
import
springfox.documentation.builders.RequestHandlerSelectors
;
import
springfox.documentation.builders.RequestHandlerSelectors
;
import
springfox.documentation.spi.DocumentationType
;
import
springfox.documentation.spi.DocumentationType
;
import
springfox.documentation.spi.schema.EnumTypeDeterminer
;
import
springfox.documentation.spi.service.OperationBuilderPlugin
;
import
springfox.documentation.spi.service.OperationBuilderPlugin
;
import
springfox.documentation.spring.web.plugins.Docket
;
import
springfox.documentation.spring.web.plugins.Docket
;
import
springfox.documentation.spring.web.readers.operation.OperationParameterReader
;
import
springfox.documentation.spring.web.readers.operation.OperationParameterReader
;
import
springfox.documentation.spring.web.readers.parameter.ModelAttributeParameterExpander
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
import
java.lang.reflect.Field
;
import
java.lang.reflect.Field
;
...
@@ -88,4 +88,10 @@ public class SwaggerConfiguration {
...
@@ -88,4 +88,10 @@ public class SwaggerConfiguration {
}
}
}
}
}
}
@Bean
public
IBZOperationParameterReader
iBZOperationParameterReader
(
ModelAttributeParameterExpander
expander
,
EnumTypeDeterminer
enumTypeDeterminer
){
IBZOperationParameterReader
iBZOperationParameterReader
=
new
IBZOperationParameterReader
(
expander
,
enumTypeDeterminer
)
;
return
iBZOperationParameterReader
;
}
}
}
ibzou-provider/ibzou-provider-api/src/main/resources/application-api-dev.yml
浏览文件 @
69db4815
server
:
server
:
port
:
8081
port
:
40001
\ No newline at end of file
\ No newline at end of file
ibzou-provider/ibzou-provider-api/src/main/resources/application-api-prod.yml
浏览文件 @
69db4815
server
:
server
:
port
:
808
1
port
:
4000
1
ibzou-util/src/main/java/cn/ibizlab/util/job/PermissionSyncJob.java
浏览文件 @
69db4815
...
@@ -32,7 +32,7 @@ public class PermissionSyncJob implements ApplicationRunner {
...
@@ -32,7 +32,7 @@ public class PermissionSyncJob implements ApplicationRunner {
@Value
(
"${ibiz.enablePermissionValid:false}"
)
@Value
(
"${ibiz.enablePermissionValid:false}"
)
boolean
enablePermissionValid
;
//是否开启权限校验
boolean
enablePermissionValid
;
//是否开启权限校验
@Value
(
"${ibiz.systemid:
110B1A3E-4944-47C8-B4C4-EC15FB8982F3
}"
)
@Value
(
"${ibiz.systemid:
2C40DFCD-0DF5-47BF-91A5-C45F810B0001
}"
)
private
String
systemId
;
private
String
systemId
;
@Override
@Override
...
...
ibzou-util/src/main/java/cn/ibizlab/util/service/RemoteService.java
浏览文件 @
69db4815
...
@@ -12,15 +12,10 @@ import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
...
@@ -12,15 +12,10 @@ import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import
org.springframework.cloud.openfeign.FeignContext
;
import
org.springframework.cloud.openfeign.FeignContext
;
import
org.springframework.cloud.openfeign.support.SpringDecoder
;
import
org.springframework.cloud.openfeign.support.SpringDecoder
;
import
org.springframework.cloud.openfeign.support.SpringEncoder
;
import
org.springframework.cloud.openfeign.support.SpringEncoder
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.http.converter.HttpMessageConverter
;
import
org.springframework.http.converter.HttpMessageConverter
;
import
org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
;
import
org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.Map
;
import
java.util.Map
;
import
java.util.Objects
;
import
java.util.Objects
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.concurrent.ConcurrentHashMap
;
...
@@ -85,7 +80,7 @@ public class RemoteService {
...
@@ -85,7 +80,7 @@ public class RemoteService {
* @param <T>
* @param <T>
* @return
* @return
*/
*/
private
<
T
>
T
create
(
Class
<
T
>
clazz
,
String
serviceId
)
{
private
synchronized
<
T
>
T
create
(
Class
<
T
>
clazz
,
String
serviceId
)
{
Object
object
=
FEIGN_CLIENTS
.
get
(
serviceId
);
Object
object
=
FEIGN_CLIENTS
.
get
(
serviceId
);
if
(
Objects
.
isNull
(
object
))
{
if
(
Objects
.
isNull
(
object
))
{
object
=
Feign
.
builder
()
object
=
Feign
.
builder
()
...
@@ -122,29 +117,4 @@ public class RemoteService {
...
@@ -122,29 +117,4 @@ public class RemoteService {
}
}
@Configuration
public
class
FeignTokenInterceptor
implements
RequestInterceptor
{
@Override
public
void
apply
(
RequestTemplate
template
)
{
HttpServletRequest
request
=
getServletRequest
();
if
(
null
==
request
){
return
;
}
template
.
header
(
"uid"
,
getHeaders
(
request
));
}
private
HttpServletRequest
getServletRequest
()
{
return
((
ServletRequestAttributes
)
RequestContextHolder
.
getRequestAttributes
()).
getRequest
();
}
private
String
getHeaders
(
HttpServletRequest
request
){
return
request
.
getHeader
(
"uid"
);
}
}
}
}
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录