Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
I
ibzuaa
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
ibiz4jteam
ibzuaa
提交
baeea74d
提交
baeea74d
编写于
4月 30, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibizdev提交
上级
feea6b9a
变更
14
显示空白字符变更
内嵌
并排
正在显示
14 个修改的文件
包含
149 行增加
和
22 行删除
+149
-22
config.xml
config.xml
+65
-0
pom.xml
ibzuaa-app/ibzuaa-app-web/pom.xml
+1
-1
webApplication.java
...-app-web/src/main/java/cn/ibizlab/web/webApplication.java
+10
-1
DevBootApplication.java
ibzuaa-boot/src/main/java/cn/ibizlab/DevBootApplication.java
+10
-1
application-dev.yml
ibzuaa-boot/src/main/resources/application-dev.yml
+1
-1
pom.xml
ibzuaa-provider/ibzuaa-provider-uaaapi/pom.xml
+1
-0
Dockerfile
...rovider/ibzuaa-provider-uaaapi/src/main/docker/Dockerfile
+1
-1
ibzuaa-provider-uaaapi.yaml
...ovider-uaaapi/src/main/docker/ibzuaa-provider-uaaapi.yaml
+1
-1
ibzuaauaaapiApplication.java
.../main/java/cn/ibizlab/uaaapi/ibzuaauaaapiApplication.java
+10
-1
application-uaaapi-dev.yml
...ider-uaaapi/src/main/resources/application-uaaapi-dev.yml
+1
-1
application-uaaapi-prod.yml
...der-uaaapi/src/main/resources/application-uaaapi-prod.yml
+1
-1
SearchContextBase.java
...c/main/java/cn/ibizlab/util/filter/SearchContextBase.java
+5
-9
AuthenticationUser.java
...ain/java/cn/ibizlab/util/security/AuthenticationUser.java
+4
-4
SearchContextHandlerMethodArgumentResolver.java
.../util/web/SearchContextHandlerMethodArgumentResolver.java
+38
-0
未找到文件。
config.xml
0 → 100644
浏览文件 @
baeea74d
<?xml version='1.1' encoding='UTF-8'?>
<project>
<actions/>
<description>
ibzuaa
</description>
<keepDependencies>
false
</keepDependencies>
<properties>
<hudson.model.ParametersDefinitionProperty>
<parameterDefinitions>
<hudson.model.StringParameterDefinition>
<name>
para1
</name>
<description></description>
<defaultValue>
para1
</defaultValue>
<trim>
false
</trim>
</hudson.model.StringParameterDefinition>
<hudson.model.StringParameterDefinition>
<name>
para2
</name>
<description></description>
<defaultValue>
para2
</defaultValue>
<trim>
false
</trim>
</hudson.model.StringParameterDefinition>
</parameterDefinitions>
</hudson.model.ParametersDefinitionProperty>
</properties>
<scm
class=
"hudson.scm.NullSCM"
/>
<canRoam>
true
</canRoam>
<disabled>
false
</disabled>
<blockBuildWhenDownstreamBuilding>
false
</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>
false
</blockBuildWhenUpstreamBuilding>
<triggers/>
<concurrentBuild>
false
</concurrentBuild>
<builders>
<hudson.tasks.Shell>
<command>
BUILD_ID=DONTKILLME
echo "registry.cn-shanghai.aliyuncs.com/ibizsys"
source /etc/profile
rm -rf ibzuaa
git clone -b master $para2 ibzuaa/
export NODE_OPTIONS=--max-old-space-size=4096
cd ibzuaa/
mvn clean package -Puaaapi
cd ibzuaa-provider/ibzuaa-provider-uaaapi
mvn -Puaaapi docker:build
mvn -Puaaapi docker:push
docker -H $para1 stack deploy --compose-file=src/main/docker/ibzuaa-provider-uaaapi.yaml dev --with-registry-auth
</command>
</hudson.tasks.Shell>
</builders>
<publishers>
<hudson.plugins.ws__cleanup.WsCleanup
plugin=
"ws-cleanup@0.34"
>
<patterns
class=
"empty-list"
/>
<deleteDirs>
false
</deleteDirs>
<skipWhenFailed>
false
</skipWhenFailed>
<cleanWhenSuccess>
true
</cleanWhenSuccess>
<cleanWhenUnstable>
true
</cleanWhenUnstable>
<cleanWhenFailure>
true
</cleanWhenFailure>
<cleanWhenNotBuilt>
true
</cleanWhenNotBuilt>
<cleanWhenAborted>
true
</cleanWhenAborted>
<notFailBuild>
false
</notFailBuild>
<cleanupMatrixParent>
false
</cleanupMatrixParent>
<externalDelete></externalDelete>
</hudson.plugins.ws__cleanup.WsCleanup>
</publishers>
<buildWrappers/>
</project>
ibzuaa-app/ibzuaa-app-web/pom.xml
浏览文件 @
baeea74d
ibzuaa-app/ibzuaa-app-web/src/main/java/cn/ibizlab/web/webApplication.java
浏览文件 @
baeea74d
...
@@ -11,6 +11,9 @@ import org.springframework.context.annotation.Configuration;
...
@@ -11,6 +11,9 @@ import org.springframework.context.annotation.Configuration;
import
org.springframework.context.annotation.Import
;
import
org.springframework.context.annotation.Import
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.web.method.support.HandlerMethodArgumentResolver
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
;
import
java.util.List
;
@Slf4j
@Slf4j
@Import
({
@Import
({
...
@@ -25,9 +28,15 @@ import org.springframework.boot.SpringApplication;
...
@@ -25,9 +28,15 @@ import org.springframework.boot.SpringApplication;
@SpringBootApplication
(
exclude
=
{
@SpringBootApplication
(
exclude
=
{
org
.
springframework
.
boot
.
autoconfigure
.
security
.
servlet
.
SecurityAutoConfiguration
.
class
,
org
.
springframework
.
boot
.
autoconfigure
.
security
.
servlet
.
SecurityAutoConfiguration
.
class
,
})
})
public
class
webApplication
{
public
class
webApplication
extends
WebMvcConfigurerAdapter
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
webApplication
.
class
,
args
);
SpringApplication
.
run
(
webApplication
.
class
,
args
);
}
}
@Override
public
void
addArgumentResolvers
(
List
<
HandlerMethodArgumentResolver
>
argumentResolvers
)
{
super
.
addArgumentResolvers
(
argumentResolvers
);
argumentResolvers
.
add
(
new
cn
.
ibizlab
.
util
.
web
.
SearchContextHandlerMethodArgumentResolver
());
}
}
}
ibzuaa-boot/src/main/java/cn/ibizlab/DevBootApplication.java
浏览文件 @
baeea74d
...
@@ -7,6 +7,9 @@ import org.springframework.context.annotation.Configuration;
...
@@ -7,6 +7,9 @@ import org.springframework.context.annotation.Configuration;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.cloud.openfeign.EnableFeignClients
;
import
org.springframework.web.method.support.HandlerMethodArgumentResolver
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
;
import
java.util.List
;
@Slf4j
@Slf4j
@EnableDiscoveryClient
@EnableDiscoveryClient
...
@@ -14,9 +17,15 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
...
@@ -14,9 +17,15 @@ import org.springframework.cloud.openfeign.EnableFeignClients;
@EnableTransactionManagement
@EnableTransactionManagement
@SpringBootApplication
@SpringBootApplication
@EnableFeignClients
(
basePackages
=
{
"cn.ibizlab"
})
@EnableFeignClients
(
basePackages
=
{
"cn.ibizlab"
})
public
class
DevBootApplication
{
public
class
DevBootApplication
extends
WebMvcConfigurerAdapter
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
DevBootApplication
.
class
,
args
);
SpringApplication
.
run
(
DevBootApplication
.
class
,
args
);
}
}
@Override
public
void
addArgumentResolvers
(
List
<
HandlerMethodArgumentResolver
>
argumentResolvers
)
{
super
.
addArgumentResolvers
(
argumentResolvers
);
argumentResolvers
.
add
(
new
cn
.
ibizlab
.
util
.
web
.
SearchContextHandlerMethodArgumentResolver
());
}
}
}
ibzuaa-boot/src/main/resources/application-dev.yml
浏览文件 @
baeea74d
server
:
server
:
port
:
8080
port
:
40002
\ No newline at end of file
\ No newline at end of file
ibzuaa-provider/ibzuaa-provider-uaaapi/pom.xml
浏览文件 @
baeea74d
...
@@ -66,6 +66,7 @@
...
@@ -66,6 +66,7 @@
</execution>
</execution>
</executions>
</executions>
</plugin>
</plugin>
<plugin>
<plugin>
<groupId>
com.spotify
</groupId>
<groupId>
com.spotify
</groupId>
<artifactId>
docker-maven-plugin
</artifactId>
<artifactId>
docker-maven-plugin
</artifactId>
...
...
ibzuaa-provider/ibzuaa-provider-uaaapi/src/main/docker/Dockerfile
浏览文件 @
baeea74d
...
@@ -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 /ibzuaa-provider-uaaapi.jar
java ${JAVA_OPTS} -Djava.security.egd=file:/dev/./urandom -jar /ibzuaa-provider-uaaapi.jar
EXPOSE
8081
EXPOSE
40002
ADD
ibzuaa-provider-uaaapi.jar /ibzuaa-provider-uaaapi.jar
ADD
ibzuaa-provider-uaaapi.jar /ibzuaa-provider-uaaapi.jar
ibzuaa-provider/ibzuaa-provider-uaaapi/src/main/docker/ibzuaa-provider-uaaapi.yaml
浏览文件 @
baeea74d
...
@@ -3,7 +3,7 @@ services:
...
@@ -3,7 +3,7 @@ services:
ibzuaa-provider-uaaapi
:
ibzuaa-provider-uaaapi
:
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzuaa-provider-uaaapi:latest
image
:
registry.cn-shanghai.aliyuncs.com/ibizsys/ibzuaa-provider-uaaapi:latest
ports
:
ports
:
-
"
8081:8081
"
-
"
40002:40002
"
networks
:
networks
:
-
agent_network
-
agent_network
deploy
:
deploy
:
...
...
ibzuaa-provider/ibzuaa-provider-uaaapi/src/main/java/cn/ibizlab/uaaapi/ibzuaauaaapiApplication.java
浏览文件 @
baeea74d
...
@@ -9,6 +9,9 @@ import org.springframework.context.annotation.Configuration;
...
@@ -9,6 +9,9 @@ import org.springframework.context.annotation.Configuration;
import
org.springframework.data.mongodb.repository.config.EnableMongoRepositories
;
import
org.springframework.data.mongodb.repository.config.EnableMongoRepositories
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.mybatis.spring.annotation.MapperScan
;
import
org.springframework.web.method.support.HandlerMethodArgumentResolver
;
import
org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
;
import
java.util.List
;
@Slf4j
@Slf4j
@EnableDiscoveryClient
@EnableDiscoveryClient
...
@@ -20,9 +23,15 @@ import org.mybatis.spring.annotation.MapperScan;
...
@@ -20,9 +23,15 @@ import org.mybatis.spring.annotation.MapperScan;
@SpringBootApplication
(
exclude
=
{
@SpringBootApplication
(
exclude
=
{
org
.
springframework
.
boot
.
autoconfigure
.
security
.
servlet
.
SecurityAutoConfiguration
.
class
,
org
.
springframework
.
boot
.
autoconfigure
.
security
.
servlet
.
SecurityAutoConfiguration
.
class
,
})
})
public
class
ibzuaauaaapiApplication
{
public
class
ibzuaauaaapiApplication
extends
WebMvcConfigurerAdapter
{
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
ibzuaauaaapiApplication
.
class
,
args
);
SpringApplication
.
run
(
ibzuaauaaapiApplication
.
class
,
args
);
}
}
@Override
public
void
addArgumentResolvers
(
List
<
HandlerMethodArgumentResolver
>
argumentResolvers
)
{
super
.
addArgumentResolvers
(
argumentResolvers
);
argumentResolvers
.
add
(
new
cn
.
ibizlab
.
util
.
web
.
SearchContextHandlerMethodArgumentResolver
());
}
}
}
ibzuaa-provider/ibzuaa-provider-uaaapi/src/main/resources/application-uaaapi-dev.yml
浏览文件 @
baeea74d
server
:
server
:
port
:
8081
port
:
40002
\ No newline at end of file
\ No newline at end of file
ibzuaa-provider/ibzuaa-provider-uaaapi/src/main/resources/application-uaaapi-prod.yml
浏览文件 @
baeea74d
server
:
server
:
port
:
8081
port
:
40002
ibzuaa-util/src/main/java/cn/ibizlab/util/filter/SearchContextBase.java
浏览文件 @
baeea74d
package
cn
.
ibizlab
.
util
.
filter
;
package
cn
.
ibizlab
.
util
.
filter
;
import
cn.ibizlab.util.security.AuthenticationUser
;
import
com.fasterxml.jackson.annotation.JsonAnyGetter
;
import
com.fasterxml.jackson.annotation.JsonAnyGetter
;
import
com.fasterxml.jackson.annotation.JsonAnySetter
;
import
com.fasterxml.jackson.annotation.JsonAnySetter
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
import
com.fasterxml.jackson.annotation.JsonProperty
;
...
@@ -105,17 +106,12 @@ public class SearchContextBase implements ISearchContext{
...
@@ -105,17 +106,12 @@ public class SearchContextBase implements ISearchContext{
return
params
;
return
params
;
}
}
/**
* 用户上下文参数
*/
Map
<
String
,
Object
>
sessionparams
=
new
HashMap
<
String
,
Object
>()
;
/**
/**
* 获取用户上下文
* 获取用户上下文
* @return
* @return
*/
*/
public
Map
<
String
,
Object
>
getSessioncontext
()
{
public
Map
<
String
,
Object
>
getSessioncontext
()
{
return
sessionparams
;
return
AuthenticationUser
.
getAuthenticationUser
().
getSessionParams
()
;
}
}
@JsonAnyGetter
@JsonAnyGetter
...
...
ibzuaa-util/src/main/java/cn/ibizlab/util/security/AuthenticationUser.java
浏览文件 @
baeea74d
...
@@ -55,7 +55,7 @@ public class AuthenticationUser implements UserDetails
...
@@ -55,7 +55,7 @@ public class AuthenticationUser implements UserDetails
private
String
fontsize
;
private
String
fontsize
;
private
String
lang
;
private
String
lang
;
private
String
memo
;
private
String
memo
;
private
Map
<
String
,
String
>
sessionParams
;
private
Map
<
String
,
Object
>
sessionParams
;
@JsonIgnore
@JsonIgnore
private
Collection
<
GrantedAuthority
>
authorities
;
private
Collection
<
GrantedAuthority
>
authorities
;
@JsonIgnore
@JsonIgnore
...
@@ -65,7 +65,7 @@ public class AuthenticationUser implements UserDetails
...
@@ -65,7 +65,7 @@ public class AuthenticationUser implements UserDetails
private
String
orglevel
;
//单位级别
private
String
orglevel
;
//单位级别
private
String
deptlevel
;
//部门级别
private
String
deptlevel
;
//部门级别
@JsonIgnore
@JsonIgnore
private
Map
<
String
,
String
>
userSessionParam
;
//用户自定义session值
private
Map
<
String
,
Object
>
userSessionParam
;
//用户自定义session值
@JsonIgnore
@JsonIgnore
private
JSONObject
orgInfo
;
//上下级组织信息
private
JSONObject
orgInfo
;
//上下级组织信息
...
@@ -115,7 +115,7 @@ public class AuthenticationUser implements UserDetails
...
@@ -115,7 +115,7 @@ public class AuthenticationUser implements UserDetails
return
authuserdetail
;
return
authuserdetail
;
}
}
public
Map
<
String
,
String
>
getSessionParams
()
public
Map
<
String
,
Object
>
getSessionParams
()
{
{
if
(
this
.
sessionParams
==
null
)
if
(
this
.
sessionParams
==
null
)
{
{
...
@@ -139,7 +139,7 @@ public class AuthenticationUser implements UserDetails
...
@@ -139,7 +139,7 @@ public class AuthenticationUser implements UserDetails
}
}
return
this
.
sessionParams
;
return
this
.
sessionParams
;
}
}
private
Map
<
String
,
String
>
getUserSessionParam
()
{
private
Map
<
String
,
Object
>
getUserSessionParam
()
{
if
(
userSessionParam
!=
null
)
if
(
userSessionParam
!=
null
)
return
userSessionParam
;
return
userSessionParam
;
else
else
...
...
ibzuaa-util/src/main/java/cn/ibizlab/util/web/SearchContextHandlerMethodArgumentResolver.java
0 → 100644
浏览文件 @
baeea74d
package
cn
.
ibizlab
.
util
.
web
;
import
cn.ibizlab.util.filter.SearchContextBase
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.core.MethodParameter
;
import
org.springframework.web.bind.support.WebDataBinderFactory
;
import
org.springframework.web.context.request.NativeWebRequest
;
import
org.springframework.web.method.support.HandlerMethodArgumentResolver
;
import
org.springframework.web.method.support.ModelAndViewContainer
;
import
java.util.LinkedHashMap
;
import
java.util.Map
;
@Slf4j
public
class
SearchContextHandlerMethodArgumentResolver
implements
HandlerMethodArgumentResolver
{
private
static
ObjectMapper
objectMapper
=
new
ObjectMapper
();
@Override
public
boolean
supportsParameter
(
MethodParameter
parameter
)
{
return
SearchContextBase
.
class
.
isAssignableFrom
(
parameter
.
getParameterType
());
}
@Override
public
Object
resolveArgument
(
MethodParameter
parameter
,
ModelAndViewContainer
mavContainer
,
NativeWebRequest
webRequest
,
WebDataBinderFactory
binderFactory
)
throws
Exception
{
Map
<
String
,
String
[]>
params
=
webRequest
.
getParameterMap
();
LinkedHashMap
<
String
,
Object
>
set
=
new
LinkedHashMap
<>();
for
(
String
key
:
params
.
keySet
())
{
set
.
put
(
key
,
params
.
get
(
key
)[
0
]);
}
String
json
=
objectMapper
.
writeValueAsString
(
set
);
return
objectMapper
.
readValue
(
json
,
parameter
.
getParameterType
());
}
}
\ No newline at end of file
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录