Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
ioc_sixiang_license
Project
Project
Details
Activity
Releases
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
zengtianlai3
ioc_sixiang_license
Commits
30b02192
Commit
30b02192
authored
Feb 14, 2023
by
ma
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'remotes/origin/master' into for-yx
parents
545d8964
8131806a
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
44 additions
and
108 deletions
+44
-108
pom.xml
license/pom.xml
+13
-0
LicenseApplication.java
...src/main/java/iot/sixiang/license/LicenseApplication.java
+2
-0
JwtFilter.java
license/src/main/java/iot/sixiang/license/jwt/JwtFilter.java
+2
-1
application-prod.yml
license/src/main/resources/application-prod.yml
+27
-0
logback-spring.xml
license/src/main/resources/logback-spring.xml
+0
-107
No files found.
license/pom.xml
View file @
30b02192
...
...
@@ -15,6 +15,7 @@
<description>
Demo project for Spring Boot
</description>
<properties>
<java.version>
1.8
</java.version>
<acc.log.version>
1.0.2
</acc.log.version>
</properties>
<dependencies>
...
...
@@ -154,8 +155,20 @@
<systemPath>
${project.basedir}/lib/secret-1.0.5.jar
</systemPath>
</dependency>
<dependency>
<groupId>
com.acc
</groupId>
<artifactId>
log
</artifactId>
<version>
${acc.log.version}
</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>
maven-releases
</id>
<url>
http://120.24.220.98:8868/repository/maven-public/
</url>
</repository>
</repositories>
<build>
<finalName>
license
</finalName>
<plugins>
...
...
license/src/main/java/iot/sixiang/license/LicenseApplication.java
View file @
30b02192
...
...
@@ -4,6 +4,7 @@ import org.mybatis.spring.annotation.MapperScan;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.scheduling.annotation.EnableAsync
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry
;
...
...
@@ -14,6 +15,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@SpringBootApplication
@EnableScheduling
@MapperScan
(
basePackages
=
"iot.sixiang.license.mapper"
)
@ComponentScan
(
basePackages
=
{
"iot.sixiang.license"
,
"com.acc"
})
public
class
LicenseApplication
implements
WebMvcConfigurer
{
@Override
...
...
license/src/main/java/iot/sixiang/license/jwt/JwtFilter.java
View file @
30b02192
...
...
@@ -36,6 +36,7 @@ public class JwtFilter implements Filter {
private
static
final
String
url12
=
"/report_error_msg"
;
private
static
final
String
url13
=
"/bind"
;
private
static
final
String
url14
=
"/get_bind_status"
;
private
static
final
String
url15
=
"/log/get"
;
@Override
public
void
init
(
FilterConfig
filterConfig
)
{
...
...
@@ -60,7 +61,7 @@ public class JwtFilter implements Filter {
boolean
check
=
true
;
String
uri
=
request
.
getRequestURI
();
if
(
uri
.
contains
(
url1
)
||
uri
.
contains
(
url2
)
||
uri
.
contains
(
url3
)
||
uri
.
contains
(
url4
)
||
uri
.
contains
(
url7
)
||
uri
.
contains
(
url8
)
||
uri
.
contains
(
url9
)
||
uri
.
contains
(
url10
)
||
uri
.
contains
(
url11
))
{
if
(
uri
.
contains
(
url1
)
||
uri
.
contains
(
url2
)
||
uri
.
contains
(
url3
)
||
uri
.
contains
(
url4
)
||
uri
.
contains
(
url7
)
||
uri
.
contains
(
url8
)
||
uri
.
contains
(
url9
)
||
uri
.
contains
(
url10
)
||
uri
.
contains
(
url11
)
||
uri
.
contains
(
url15
)
)
{
if
(
uri
.
contains
(
url1
)
||
uri
.
contains
(
url2
))
{
uri
=
XssUtil
.
checkXSS
(
uri
);
UserUtils
.
setUri
(
uri
);
...
...
license/src/main/resources/application-prod.yml
0 → 100644
View file @
30b02192
server
:
port
:
8868
spring
:
datasource
:
driver-class-name
:
com.mysql.cj.jdbc.Driver
url
:
jdbc:mysql://rm-wz9w0x7a26q11av687o.mysql.rds.aliyuncs.com:3306/iot_license?serverTimezone=GMT%2B8
username
:
dada
password
:
Acc2019123
main
:
allow-bean-definition-overriding
:
true
# mail:
# password: 123456
mybatis-plus
:
mapper-locations
:
classpath:/mapper/**.xml
type-aliases-package
:
iot.sixiang.license.entity
knife4j
:
enable
:
true
logging
:
level
:
root
:
info
other
:
sm4-key
:
sixiang890123456
jasypt
:
encryptor
:
password
:
acc
\ No newline at end of file
license/src/main/resources/logback-spring.xml
deleted
100644 → 0
View file @
545d8964
<?xml version="1.0" encoding="UTF-8"?>
<configuration
scan=
"false"
scanPeriod=
"10 seconds"
>
<!-- <logger>用来设置某一个包或者具体的某一个类的日志打印级别、 -->
<!-- <logger name="iot.sixiang.license" level="debug" />-->
<!--控制台输出的格式设置 -->
<appender
name=
"STDOUT"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<!-- 控制台输出的日志 的格式 -->
<encoder>
<pattern>
%date{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %5level %logger{96}:%line - %msg%n
</pattern>
<charset>
UTF-8
</charset>
<!-- 此处设置字符集 -->
</encoder>
<!-- 只是DEBUG级别以上的日志才显示 -->
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
DEBUG
</level>
</filter>
</appender>
<!--文件输出的格式设置 -->
<appender
name=
"ALL_FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<!-- 日志日常打印文件 -->
<file>
logs/license.log
</file>
<!-- 配置日志所生成的目录以及生成文件名的规则 -->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
logs/license.log-%d{yyyy-MM-dd}.%i
</fileNamePattern>
<!-- 如果按天来回滚,则最大保存时间为365天,365天之前的都将被清理掉 -->
<maxHistory>
365
</maxHistory>
<!-- 日志总保存量为10GB -->
<totalSizeCap>
100GB
</totalSizeCap>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<!--文件达到 最大128MB时会被压缩和切割 -->
<maxFileSize>
40 MB
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
DEBUG
</level>
</filter>
<!-- 文件输出的日志 的格式 -->
<encoder>
<pattern>
%date{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %5level %logger{96}:%line - %msg%n
</pattern>
<charset>
UTF-8
</charset>
<!-- 此处设置字符集 -->
</encoder>
<!-- Safely log to the same file from multiple JVMs. Degrades performance! -->
<prudent>
false
</prudent>
</appender>
<!--文件输出的格式设置 -->
<appender
name=
"MSG_FILE"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<!-- 日志日常打印文件 -->
<file>
logs/message.log
</file>
<!-- 配置日志所生成的目录以及生成文件名的规则 -->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<fileNamePattern>
logs/message.log-%d{yyyy-MM-dd}.%i
</fileNamePattern>
<!-- 如果按天来回滚,则最大保存时间为365天,365天之前的都将被清理掉 -->
<maxHistory>
365
</maxHistory>
<!-- 日志总保存量为10GB -->
<totalSizeCap>
100GB
</totalSizeCap>
<timeBasedFileNamingAndTriggeringPolicy
class=
"ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"
>
<!--文件达到 最大128MB时会被压缩和切割 -->
<maxFileSize>
40 MB
</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
</rollingPolicy>
<!-- 此日志文档只记录info级别的 -->
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
INFO
</level>
<onMatch>
ACCEPT
</onMatch>
<onMismatch>
DENY
</onMismatch>
</filter>
<!-- 文件输出的日志 的格式 -->
<encoder>
<pattern>
%date{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %5level %logger{96}:%line - %msg%n
</pattern>
<charset>
UTF-8
</charset>
<!-- 此处设置字符集 -->
</encoder>
<!-- Safely log to the same file from multiple JVMs. Degrades performance! -->
<prudent>
false
</prudent>
</appender>
<!-- Enable FILE and STDOUT appenders for all log messages. By default,
only log at level INFO and above. -->
<!--这里选择INFO就代表,进行INFO级别输出记录,那么在控制台也好,log文件也好只记录INFO及以上级别的日志,这里相当于第一道设置-->
<root
level=
"info"
>
<appender-ref
ref=
"STDOUT"
/>
<appender-ref
ref=
"ALL_FILE"
/>
<appender-ref
ref=
"MSG_FILE"
/>
</root>
</configuration>
\ 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