Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tagManager
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lanmw
tagManager
Commits
e7e71201
Commit
e7e71201
authored
Nov 03, 2020
by
linxu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor
parent
8e440779
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
63 additions
and
268 deletions
+63
-268
auth-common-2.0.0.jar
lib/auth-common-2.0.0.jar
+0
-0
pom.xml
pom.xml
+19
-146
settings.xml
settings.xml
+23
-0
ExcelParser.java
src/main/java/com/keymobile/tagmanager/api/ExcelParser.java
+1
-1
TagCtrl.java
src/main/java/com/keymobile/tagmanager/api/TagCtrl.java
+2
-2
TagFileCtrl.java
src/main/java/com/keymobile/tagmanager/api/TagFileCtrl.java
+2
-2
TagRelCtrl.java
src/main/java/com/keymobile/tagmanager/api/TagRelCtrl.java
+2
-2
SecurityConfig.java
.../java/com/keymobile/tagmanager/config/SecurityConfig.java
+2
-2
LogManager.java
...ain/java/com/keymobile/tagmanager/logging/LogManager.java
+0
-56
MdcLogEnhancerFilter.java
...om/keymobile/tagmanager/logging/MdcLogEnhancerFilter.java
+0
-52
TagFileService.java
...java/com/keymobile/tagmanager/service/TagFileService.java
+1
-1
TagService.java
...ain/java/com/keymobile/tagmanager/service/TagService.java
+1
-1
application.properties
src/main/resources/application.properties
+10
-3
No files found.
lib/auth-common-2.0.0.jar
deleted
100644 → 0
View file @
8e440779
File deleted
pom.xml
View file @
e7e71201
...
...
@@ -13,103 +13,68 @@
<description>
tagManager
</description>
<parent>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-parent
</artifactId>
<version>
2.0.4.RELEASE
</version>
<relativePath
/>
<!-- lookup parent from repository -->
<groupId>
com.keymobile.sdrcb
</groupId>
<artifactId>
ngdb-starter
</artifactId>
<version>
1.0.0-SNAPSHOT
</version>
</parent>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
<java.version>
1.8
</java.version>
<docker.image.prefix>
springio
</docker.image.prefix>
<druid.version>
1.0.29
</druid.version>
<fastjson.version>
1.2.70
</fastjson.version>
<spring-cloud.version>
Finchley.RELEASE
</spring-cloud.version>
<easypoi.version>
4.1.3
</easypoi.version>
</properties>
<dependencies>
<dependency>
<groupId>
com.
github.ulisesbocchio
</groupId>
<artifactId>
jasypt-spring-boot-starter
</artifactId>
<version>
3.0.3
</version>
<groupId>
com.
keymobile.sdrcb
</groupId>
<artifactId>
feign-core-naive
</artifactId>
<version>
1.0.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-mongodb
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-elasticsearch
</artifactId>
<groupId>
com.keymobile.sdrcb
</groupId>
<artifactId>
common-core
</artifactId>
<version>
1.0.0-SNAPSHOT
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-
we
b
</artifactId>
<artifactId>
spring-boot-starter-
data-mongod
b
</artifactId>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-lang3
</artifactId>
<version>
3.7
</version>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger2
</artifactId>
<version>
2.
5
.0
</version>
<version>
2.
7
.0
</version>
</dependency>
<dependency>
<groupId>
io.springfox
</groupId>
<artifactId>
springfox-swagger-ui
</artifactId>
<version>
2.
5
.0
</version>
<version>
2.
7
.0
</version>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
fastjson
</artifactId>
<version>
${fastjson.version}
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-configuration-processor
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-openfeign
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-starter-netflix-eureka-client
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-redis
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.session
</groupId>
<artifactId>
spring-session-data-redis
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-security
</artifactId>
</dependency>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-config-client
</artifactId>
</dependency>
<dependency>
<groupId>
org.dom4j
</groupId>
<artifactId>
dom4j
</artifactId>
<version>
2.1.0
</version>
</dependency>
<dependency>
<groupId>
com.google.guava
</groupId>
<artifactId>
guava
</artifactId>
<version>
20.0
</version>
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-amqp
</artifactId>
</dependency>
<dependency>
<groupId>
org.antlr
</groupId>
<artifactId>
antlr4-runtime
</artifactId>
...
...
@@ -117,24 +82,12 @@
</dependency>
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-data-jpa
</artifactId>
</dependency>
<dependency>
<groupId>
redis.clients
</groupId>
<artifactId>
jedis
</artifactId>
<version>
2.9.0
</version>
</dependency>
<dependency>
<groupId>
mysql
</groupId>
<artifactId>
mysql-connector-java
</artifactId>
<version>
5.1.6
</version>
</dependency>
<!-- 引入easypoi -->
<dependency>
<groupId>
cn.afterturn
</groupId>
<artifactId>
easypoi-base
</artifactId>
<version>
${easypoi.version}
</version>
...
...
@@ -149,100 +102,20 @@
<artifactId>
easypoi-annotation
</artifactId>
<version>
${easypoi.version}
</version>
</dependency>
<!-- 引入easypoi -->
<dependency>
<groupId>
auth
</groupId>
<artifactId>
auth-common
</artifactId>
<scope>
system
</scope>
<systemPath>
${project.basedir}/lib/auth-common-2.0.0.jar
</systemPath>
<version>
1.0.2
</version>
</dependency>
<!-- cas相关 -->
<dependency>
<groupId>
com.kakawait
</groupId>
<artifactId>
cas-security-spring-boot-starter
</artifactId>
<version>
1.0.0-beta-1
</version>
</dependency>
<!-- gson -->
<dependency>
<groupId>
com.google.code.gson
</groupId>
<artifactId>
gson
</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.springframework.cloud
</groupId>
<artifactId>
spring-cloud-dependencies
</artifactId>
<version>
${spring-cloud.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
<dependency>
<groupId>
org.springframework.security
</groupId>
<artifactId>
spring-security-bom
</artifactId>
<version>
${spring-security.version}
</version>
<type>
pom
</type>
<scope>
import
</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<resources>
<resource>
<directory>
lib
</directory>
<targetPath>
BOOT-INF/lib/
</targetPath>
<includes>
<include>
**/*.jar
</include>
</includes>
</resource>
<resource>
<directory>
src/main/resources
</directory>
<includes>
<include>
*.yml
</include>
<include>
**/*.xml
</include>
</includes>
</resource>
</resources>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
</plugin>
<plugin>
<groupId>
com.spotify
</groupId>
<artifactId>
docker-maven-plugin
</artifactId>
<version>
0.4.13
</version>
<configuration>
<imageName>
${docker.image.prefix}/${project.artifactId}
</imageName>
<dockerDirectory>
src/main/docker
</dockerDirectory>
<resources>
<resource>
<targetPath>
/
</targetPath>
<directory>
${project.build.directory}
</directory>
<include>
${project.build.finalName}.jar
</include>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>
spring-milestones
</id>
<name>
Spring Milestones
</name>
<url>
https://repo.spring.io/milestone
</url>
<snapshots>
<enabled>
false
</enabled>
</snapshots>
</repository>
</repositories>
</project>
settings.xml
0 → 100644
View file @
e7e71201
<settings>
<mirrors>
<mirror>
<id>
nexus
</id>
<mirrorOf>
*
</mirrorOf>
<url>
http://mgr-00:8081/repository/maven-public/
</url>
</mirror>
</mirrors>
<servers>
<server>
<id>
nexus-snapshots
</id>
<username>
admin
</username>
<password>
dataSharing
</password>
</server>
<server>
<id>
nexus-releases
</id>
<username>
admin
</username>
<password>
dataSharing
</password>
</server>
</servers>
</settings>
\ No newline at end of file
src/main/java/com/keymobile/tagmanager/api/ExcelParser.java
View file @
e7e71201
...
...
@@ -5,7 +5,7 @@ import cn.afterturn.easypoi.excel.entity.ImportParams;
import
cn.afterturn.easypoi.excel.entity.result.ExcelImportResult
;
import
com.keymobile.tagmanager.logging.LogConstants
;
import
com.keymobile.
tagmanager
.logging.LogManager
;
import
com.keymobile.
common
.logging.LogManager
;
import
com.keymobile.tagmanager.model.SysTag
;
import
com.keymobile.tagmanager.model.system.SysApplication
;
import
com.keymobile.tagmanager.model.system.SysConstruction
;
...
...
src/main/java/com/keymobile/tagmanager/api/TagCtrl.java
View file @
e7e71201
...
...
@@ -15,10 +15,10 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.keymobile.
auth.
common.security.GrantedAuthHelper
;
import
com.keymobile.common.security.GrantedAuthHelper
;
import
com.keymobile.tagmanager.exception.TagNotExistException
;
import
com.keymobile.tagmanager.logging.LogConstants
;
import
com.keymobile.
tagmanager
.logging.LogManager
;
import
com.keymobile.
common
.logging.LogManager
;
import
com.keymobile.tagmanager.model.ExtTag
;
import
com.keymobile.tagmanager.model.Page
;
import
com.keymobile.tagmanager.model.SysTag
;
...
...
src/main/java/com/keymobile/tagmanager/api/TagFileCtrl.java
View file @
e7e71201
...
...
@@ -15,9 +15,9 @@ import org.springframework.web.bind.annotation.RequestParam;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.keymobile.
auth.
common.security.GrantedAuthHelper
;
import
com.keymobile.common.security.GrantedAuthHelper
;
import
com.keymobile.tagmanager.logging.LogConstants
;
import
com.keymobile.
tagmanager
.logging.LogManager
;
import
com.keymobile.
common
.logging.LogManager
;
import
com.keymobile.tagmanager.model.Page
;
import
com.keymobile.tagmanager.service.TagFileService
;
import
com.keymobile.tagmanager.util.UserInfoUtils
;
...
...
src/main/java/com/keymobile/tagmanager/api/TagRelCtrl.java
View file @
e7e71201
...
...
@@ -9,9 +9,9 @@ import org.springframework.web.bind.annotation.PostMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.keymobile.
auth.
common.security.GrantedAuthHelper
;
import
com.keymobile.common.security.GrantedAuthHelper
;
import
com.keymobile.tagmanager.logging.LogConstants
;
import
com.keymobile.
tagmanager
.logging.LogManager
;
import
com.keymobile.
common
.logging.LogManager
;
import
com.keymobile.tagmanager.model.TagRelation
;
import
com.keymobile.tagmanager.service.TagRelService
;
import
com.keymobile.tagmanager.util.UserInfoUtils
;
...
...
src/main/java/com/keymobile/tagmanager/config/SecurityConfig.java
View file @
e7e71201
...
...
@@ -2,7 +2,7 @@ package com.keymobile.tagmanager.config;
import
javax.sql.DataSource
;
import
com.keymobile.
auth.
common.security.CustomizedUserDetailService
;
import
com.keymobile.common.security.CustomizedUserDetailService
;
import
org.apache.commons.codec.digest.DigestUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -18,7 +18,7 @@ import org.springframework.security.crypto.password.PasswordEncoder;
@Configuration
@EnableWebSecurity
@EnableGlobalMethodSecurity
(
prePostEnabled
=
true
)
@ComponentScan
(
"com.keymobile.
auth.
common.security"
)
@ComponentScan
(
"com.keymobile.common.security"
)
public
class
SecurityConfig
extends
WebSecurityConfigurerAdapter
{
...
...
src/main/java/com/keymobile/tagmanager/logging/LogManager.java
deleted
100644 → 0
View file @
8e440779
package
com
.
keymobile
.
tagmanager
.
logging
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
public
class
LogManager
{
public
static
void
logTrace
(
String
context
,
Throwable
e
,
String
message
)
{
Logger
logger
=
LoggerFactory
.
getLogger
(
context
);
if
(
logger
.
isTraceEnabled
())
{
logger
.
trace
(
message
,
e
);
}
}
public
static
void
logTrace
(
String
context
,
String
message
)
{
logTrace
(
context
,
null
,
message
);
}
public
static
void
logDebug
(
String
context
,
String
message
)
{
Logger
logger
=
LoggerFactory
.
getLogger
(
context
);
if
(
logger
.
isDebugEnabled
())
{
logger
.
debug
(
message
);
}
}
public
static
void
logInfo
(
String
context
,
String
message
)
{
Logger
logger
=
LoggerFactory
.
getLogger
(
context
);
if
(
logger
.
isInfoEnabled
())
{
logger
.
info
(
message
);
}
}
public
static
void
logWarning
(
String
context
,
Throwable
e
,
String
message
)
{
Logger
logger
=
LoggerFactory
.
getLogger
(
context
);
if
(
logger
.
isWarnEnabled
())
{
logger
.
warn
(
message
,
e
);
}
}
public
static
void
logWarning
(
String
context
,
String
message
)
{
logWarning
(
context
,
null
,
message
);
}
public
static
void
logError
(
String
context
,
Throwable
e
,
String
message
)
{
Logger
logger
=
LoggerFactory
.
getLogger
(
context
);
if
(
logger
.
isErrorEnabled
())
{
logger
.
error
(
message
,
e
);
}
}
public
static
void
logError
(
String
context
,
String
message
)
{
logError
(
context
,
message
);
}
}
src/main/java/com/keymobile/tagmanager/logging/MdcLogEnhancerFilter.java
deleted
100644 → 0
View file @
8e440779
package
com
.
keymobile
.
tagmanager
.
logging
;
import
org.springframework.security.core.Authentication
;
import
org.springframework.security.core.context.SecurityContextHolder
;
import
org.springframework.stereotype.Component
;
import
org.slf4j.MDC
;
import
org.springframework.web.context.request.RequestAttributes
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
javax.servlet.*
;
import
java.io.IOException
;
@Component
public
class
MdcLogEnhancerFilter
implements
Filter
{
@Override
public
void
destroy
()
{
}
@Override
public
void
init
(
FilterConfig
filterConfig
)
throws
ServletException
{
}
@Override
public
void
doFilter
(
ServletRequest
servletRequest
,
ServletResponse
servletResponse
,
FilterChain
filterChain
)
throws
IOException
,
ServletException
{
MDC
.
put
(
"user"
,
getUser
());
MDC
.
put
(
"session"
,
getSession
());
filterChain
.
doFilter
(
servletRequest
,
servletResponse
);
}
private
String
getUser
()
{
Authentication
auth
=
SecurityContextHolder
.
getContext
().
getAuthentication
();
String
userName
=
"NO_USER"
;
if
(
auth
!=
null
)
{
userName
=
auth
.
getName
();
}
return
userName
;
}
private
String
getSession
()
{
RequestAttributes
attrs
=
RequestContextHolder
.
getRequestAttributes
();
String
session
=
"NO_SESSION"
;
if
(
attrs
!=
null
)
{
session
=
attrs
.
getSessionId
();
}
return
session
;
}
}
src/main/java/com/keymobile/tagmanager/service/TagFileService.java
View file @
e7e71201
...
...
@@ -39,7 +39,7 @@ import org.springframework.data.mongodb.core.query.Query;
import
org.springframework.stereotype.Service
;
import
org.springframework.web.multipart.MultipartFile
;
import
com.keymobile.
auth.
common.security.GrantedAuthHelper
;
import
com.keymobile.common.security.GrantedAuthHelper
;
import
com.keymobile.tagmanager.model.ImportLog
;
import
com.keymobile.tagmanager.model.Page
;
import
com.keymobile.tagmanager.model.SysTag
;
...
...
src/main/java/com/keymobile/tagmanager/service/TagService.java
View file @
e7e71201
...
...
@@ -24,7 +24,7 @@ import org.springframework.data.mongodb.core.query.Criteria;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.stereotype.Service
;
import
com.keymobile.
auth.
common.security.GrantedAuthHelper
;
import
com.keymobile.common.security.GrantedAuthHelper
;
import
com.keymobile.tagmanager.exception.TagDuplicateException
;
import
com.keymobile.tagmanager.exception.TagException
;
import
com.keymobile.tagmanager.exception.TagNotExistException
;
...
...
src/main/resources/application.properties
View file @
e7e71201
jasypt.encryptor.algorithm
=
PBEWithMD5AndDES
jasypt.encryptor.iv-generator-classname
=
org.jasypt.iv.NoIvGenerator
\ No newline at end of file
application.code
=
whatever
#management.endpoint.health.show-details=always
run.mode
=
DEV
com.alipay.env
=
shared
com.alipay.instanceid
=
GGR3SMJXTNZB
com.antcloud.antvip.endpoint
=
139.0.236.5
com.antcloud.mw.access
=
ACgYoMcAHo4vPMJU
com.antcloud.mw.secret
=
Wi2JaDa6M4xUdtReyPTHiCbPeFcMs9bt
\ No newline at end of file
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