Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
c43898ba
Commit
c43898ba
authored
Sep 25, 2024
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交配置校验
parent
fc37bae3
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
351 deletions
+22
-351
deploy.sh
deploy.sh
+3
-3
portal-manager/pom.xml
portal-manager/pom.xml
+8
-54
portal-manager/src/main/java/com/mortals/xhx/base/framework/config/ConverterConfig.java
...om/mortals/xhx/base/framework/config/ConverterConfig.java
+9
-2
portal-manager/src/main/java/com/mortals/xhx/base/framework/security/AuthTokenServiceImpl.java
...als/xhx/base/framework/security/AuthTokenServiceImpl.java
+1
-291
portal-manager/src/main/resources/bootstrap.yml
portal-manager/src/main/resources/bootstrap.yml
+1
-1
No files found.
deploy.sh
View file @
c43898ba
...
...
@@ -37,7 +37,7 @@ NGINX_CONF_PATH="/etc/nginx/conf.d"
# mysql变量
MYSQL
=
"mysql"
MYSQL_CENTOS_FILENAME
=
"mysql-5.7.
39
-linux-glibc2.12-x86_64.tar.gz"
MYSQL_CENTOS_FILENAME
=
"mysql-5.7.
43
-linux-glibc2.12-x86_64.tar.gz"
MYSQL_EXECPATH
=
"
${
SOFT_PATH
}
/
${
MYSQL
}
"
MYSQL_CONF_PATH
=
"/etc/my.cnf"
MYSQL_DATA_PATH
=
"
${
BASE_PATH
}
/
${
MYSQL
}
/data"
...
...
@@ -129,7 +129,7 @@ unix_is_centos() {
if
[
-f
"/etc/redhat-release"
]
;
then
writelog
"centos"
else
writelog
"
ubuntu
"
writelog
"
centos
"
fi
}
...
...
@@ -497,7 +497,7 @@ nacos_deploy() {
rm
-rf
${
NACOS_SERVICE
}
rm
-rf
${
NACOS_EXECPATH
}
mkdir
-p
${
NACOS_EXECPATH
}
writelog
"tar -zvxf
$BASEDIR
/release/nacos/
${
NACOS_FILENAME
}
-C
${
NACOS_EXECPATH
}
--strip-components
2
"
writelog
"tar -zvxf
$BASEDIR
/release/nacos/
${
NACOS_FILENAME
}
-C
${
NACOS_EXECPATH
}
--strip-components
3
"
tar
-zvxf
$BASEDIR
/release/nacos/
${
NACOS_FILENAME
}
-C
${
NACOS_EXECPATH
}
--strip-components
3
writelog
"
${
NACOS
}
_deploy init db..."
writelog
" mysql -h
${
MYSQL_HOST
}
-P
${
MYSQL_PORT
}
-u
${
MYSQL_USER
}
-p
${
MYSQL_PASSWORD
}
<
${
NACOS_EXECPATH
}
/db/nacos.sql"
...
...
portal-manager/pom.xml
View file @
c43898ba
...
...
@@ -19,9 +19,14 @@
<profiles.server.debug></profiles.server.debug>
<profiles.server.port>
17212
</profiles.server.port>
<profiles.log.path>
/home/mortals/app/logs
</profiles.log.path>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.namespace>
smart-gov
</profiles.nacos.namespace>
<profiles.log.level>
info
</profiles.log.level>
<profiles.publish.path>
/home/publish
</profiles.publish.path>
<profiles.filepath>
/mortals/app/data
</profiles.filepath>
<profiles.req.json.check>
false
</profiles.req.json.check>
<package.environment>
build
</package.environment>
<skipUi>
true
</skipUi>
</properties>
...
...
@@ -31,24 +36,15 @@
<properties>
<profiles.active>
develop
</profiles.active>
<profiles.nacos.server-addr>
127.0.0.1:8848
</profiles.nacos.server-addr>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.namespace>
smart-gov
</profiles.nacos.namespace>
<package.environment>
test
</package.environment>
<skipUi>
false
</skipUi>
</properties>
</profile>
<profile>
<id>
test
</id>
<activation>
<activeByDefault>
true
</activeByDefault>
</activation>
<properties>
<profiles.active>
test
</profiles.active>
<profiles.nacos.server-addr>
192.168.0.252:8848
</profiles.nacos.server-addr>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.namespace>
smart-gov
</profiles.nacos.namespace>
<package.environment>
test
</package.environment>
<skipUi>
true
</skipUi>
<profiles.req.json.check>
true
</profiles.req.json.check>
</properties>
</profile>
...
...
@@ -56,11 +52,7 @@
<id>
product
</id>
<properties>
<profiles.active>
product
</profiles.active>
<profiles.nacos.server-addr>
192.168.0.250:8848
</profiles.nacos.server-addr>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.namespace>
smart-gov
</profiles.nacos.namespace>
<package.environment>
build
</package.environment>
<skipUi>
true
</skipUi>
<profiles.nacos.server-addr>
127.0.0.1:8848
</profiles.nacos.server-addr>
</properties>
</profile>
<profile>
...
...
@@ -68,10 +60,6 @@
<properties>
<profiles.active>
yibin
</profiles.active>
<profiles.nacos.server-addr>
172.15.28.120:8848
</profiles.nacos.server-addr>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.namespace>
smart-gov
</profiles.nacos.namespace>
<package.environment>
yibin
</package.environment>
<skipUi>
true
</skipUi>
</properties>
</profile>
...
...
@@ -80,22 +68,7 @@
<properties>
<profiles.active>
sngx
</profiles.active>
<profiles.nacos.server-addr>
127.0.0.1:8848
</profiles.nacos.server-addr>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.namespace>
smart-gov
</profiles.nacos.namespace>
<package.environment>
yibin
</package.environment>
<skipUi>
false
</skipUi>
</properties>
</profile>
<profile>
<id>
regtest
</id>
<properties>
<profiles.active>
regtest
</profiles.active>
<profiles.nacos.server-addr>
127.0.0.1:8848
</profiles.nacos.server-addr>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.namespace>
smart-gov
</profiles.nacos.namespace>
<package.environment>
build
</package.environment>
<skipUi>
true
</skipUi>
</properties>
</profile>
...
...
@@ -104,10 +77,6 @@
<properties>
<profiles.active>
reg
</profiles.active>
<profiles.nacos.server-addr>
127.0.0.1:8848
</profiles.nacos.server-addr>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.namespace>
smart-gov
</profiles.nacos.namespace>
<package.environment>
build
</package.environment>
<skipUi>
true
</skipUi>
</properties>
</profile>
...
...
@@ -116,10 +85,6 @@
<properties>
<profiles.active>
qiling
</profiles.active>
<profiles.nacos.server-addr>
127.0.0.1:8848
</profiles.nacos.server-addr>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.namespace>
smart-gov
</profiles.nacos.namespace>
<package.environment>
build
</package.environment>
<skipUi>
true
</skipUi>
</properties>
</profile>
...
...
@@ -128,10 +93,7 @@
<properties>
<profiles.active>
yanyuan
</profiles.active>
<profiles.nacos.server-addr>
172.16.30.245:8848
</profiles.nacos.server-addr>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.namespace>
smart-gov
</profiles.nacos.namespace>
<package.environment>
build
</package.environment>
<skipUi>
true
</skipUi>
<profiles.req.json.check>
true
</profiles.req.json.check>
</properties>
</profile>
...
...
@@ -140,10 +102,6 @@
<properties>
<profiles.active>
pengxi
</profiles.active>
<profiles.nacos.server-addr>
192.168.106.6:8848
</profiles.nacos.server-addr>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.namespace>
smart-gov
</profiles.nacos.namespace>
<package.environment>
build
</package.environment>
<skipUi>
true
</skipUi>
</properties>
</profile>
...
...
@@ -152,10 +110,6 @@
<properties>
<profiles.active>
bzjkq
</profiles.active>
<profiles.nacos.server-addr>
127.0.0.1:8848
</profiles.nacos.server-addr>
<profiles.nacos.group>
DEFAULT_GROUP
</profiles.nacos.group>
<profiles.nacos.namespace>
smart-gov
</profiles.nacos.namespace>
<package.environment>
build
</package.environment>
<skipUi>
true
</skipUi>
</properties>
</profile>
...
...
portal-manager/src/main/java/com/mortals/xhx/base/framework/config/ConverterConfig.java
View file @
c43898ba
...
...
@@ -4,13 +4,18 @@ package com.mortals.xhx.base.framework.config;
import
com.fasterxml.jackson.databind.DeserializationFeature
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.mortals.xhx.base.framework.DateJacksonConverter
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean
;
import
org.springframework.http.converter.json.MappingJackson2HttpMessageConverter
;
//
@Configuration
@Configuration
public
class
ConverterConfig
{
@Value
(
"${jsonCheck:false}"
)
private
Boolean
jsonCheck
;
@Bean
public
DateJacksonConverter
dateJacksonConverter
()
{
return
new
DateJacksonConverter
();
...
...
@@ -26,7 +31,9 @@ public class ConverterConfig {
@Bean
public
MappingJackson2HttpMessageConverter
mappingJackson2HttpMessageConverter
(
ObjectMapper
objectMapper
)
{
if
(
jsonCheck
!=
null
&&
jsonCheck
){
objectMapper
.
configure
(
DeserializationFeature
.
FAIL_ON_UNKNOWN_PROPERTIES
,
true
);
}
MappingJackson2HttpMessageConverter
mappingJackson2HttpMessageConverter
=
new
MappingJackson2HttpMessageConverter
();
mappingJackson2HttpMessageConverter
.
setObjectMapper
(
objectMapper
);
...
...
portal-manager/src/main/java/com/mortals/xhx/base/framework/security/AuthTokenServiceImpl.java
View file @
c43898ba
...
...
@@ -111,299 +111,9 @@ public class AuthTokenServiceImpl implements IAuthTokenService {
cacheService
.
hset
(
RedisKey
.
KEY_USER_MENU_CACHE
,
userEntity
.
getId
().
toString
(),
menuUrlCode
);
}
userEntity
.
setMenuUrl
(
menuUrlCode
);
return
userEntity
;
/*return new IUser() {
*//**
* @return
*//*
@Override
public Long getId() {
return userEntity.getId();
}
*//**
* @return
*//*
@Override
public Long getDeptId() {
return userEntity.getDeptId();
}
*//**
* @return
*//*
@Override
public String getDeptName() {
return userEntity.getDeptName();
}
*//**
* @return
*//*
@Override
public Long getCustomerId() {
return userEntity.getCustomerId();
}
*//**
* @return
*//*
@Override
public Long getSiteId() {
return userEntity.getSiteId();
}
*//**
* @return
*//*
@Override
public String getSiteIds() {
return userEntity.getSiteIds();
}
*//**
* @return
*//*
@Override
public String getAreaCodes() {
return userEntity.getAreaCodes();
}
*//**
* @return
*//*
@Override
public Long getCustomerJoinId() {
return userEntity.getCustomerJoinId();
}
*//**
* @return
*//*
@Override
public String getCustomerNum() {
return userEntity.getCustomerNum();
}
*//**
* @return
*//*
@Override
public String getLoginName() {
return userEntity.getLoginName();
}
*//**
* @return
*//*
@Override
public String getRealName() {
return userEntity.getRealName();
}
*//**
* @return
*//*
@Override
public boolean isAdmin() {
return userEntity.isAdmin();
}
*//**
* @return
*//*
@Override
public boolean isSystemUser() {
return userEntity.isSystemUser();
}
*//**
* @return
*//*
@Override
public boolean isManager() {
return userEntity.isManager();
}
*//**
* @return
*//*
@Override
public Integer getUserType() {
return userEntity.getUserType();
}
*//**
* @return
*//*
@Override
public String getToken() {
return userEntity.getToken();
}
*//**
* @return
*//*
@Override
public Long getLoginTime() {
return userEntity.getLoginTime();
}
*//**
* @return
*//*
@Override
public Long getExpireTime() {
return userEntity.getExpireTime();
}
*//**
* @param expireTime
*//*
@Override
public void setExpireTime(Long expireTime) {
}
*//**
* @return
*//*
@Override
public String getMenuUrl() {
return userEntity.getMenuUrl();
}
};*/
// return userEntity;
/* if (StringUtils.isNotEmpty(userStr)) {
JSONObject userObj = JSON.parseObject(userStr);
Long userId = userObj.getLongValue("id");
Integer userType = userObj.getIntValue("userType");
Long customerId = userObj.getLongValue("customerId");
Long siteId = userObj.getLongValue("siteId");
Long loginTime = userObj.getLongValue("loginTime");
Long expireTime = userObj.getLongValue("expireTime");
String loginName = userObj.getString("loginName");
String realName = userObj.getString("realName");
String siteIds = userObj.getString("siteIds");
String menuUrl = userObj.getString("menuUrl");
Boolean isManager = userObj.getBoolean("manager");
Boolean isSystemUser = userObj.getBoolean("systemUser");
String areaCodes = userObj.getString("areaCodes");
return new IUser() {
@Override
public Long getId() {
return userId;
}
@Override
public Long getDeptId() {
return null;
}
@Override
public String getDeptName() {
return null;
}
@Override
public Long getCustomerId() {
return customerId;
}
@Override
public Long getSiteId() {
return siteId;
}
@Override
public String getSiteIds() {
return siteIds;
}
@Override
public String getAreaCodes() {
return areaCodes;
}
@Override
public Long getCustomerJoinId() {
return null;
}
@Override
public String getCustomerNum() {
return null;
}
@Override
public String getLoginName() {
return loginName;
}
@Override
public String getRealName() {
return realName;
}
@Override
public boolean isAdmin() {
return userId == 1L;
}
@Override
public boolean isSystemUser() {
return isSystemUser;
}
@Override
public boolean isManager() {
return isManager;
}
@Override
public Integer getUserType() {
return userType;
}
@Override
public String getToken() {
return token;
}
@Override
public Long getLoginTime() {
return loginTime;
}
@Override
public Long getExpireTime() {
return expireTime;
}
@Override
public void setExpireTime(Long expireTime) {
}
@Override
public String getMenuUrl() {
return menuUrl;
}
};
}*/
// return cacheService.get(userKey, IUser.class);
}
catch
(
Exception
e
)
{
log
.
error
(
"解析jwt token异常!"
,
e
);
log
.
error
(
"解析jwt token异常!"
,
e
.
getMessage
()
);
return
null
;
}
}
...
...
portal-manager/src/main/resources/bootstrap.yml
View file @
c43898ba
...
...
@@ -41,7 +41,7 @@ application:
auth
:
unloginUrl
:
/refresh,/error,/login/login,/login/index,/login/logout,/securitycode/createCode,/file/common/*,/test*,/padsign/*,/terminal/*,/resource/list,/api/asset/*,/api/*,/flow/*,/uploads/*,/project/file/*,/file/*,/doc.html
uncheckUrl
:
/refresh,/error,/login/login,/login/index,/login/logout,/securitycode/createCode,/file/common/*,/test*,/padsign/*,/terminal/*,/resource/list,/api/asset/*,/api/*,/flow/*,/uploads/*,/project/file/*,/file/*,/doc.html
jsonCheck
:
@
profiles.req.json.check@
#sys:
# license:
# key: /home/license/license.key
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment