Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
entrance_api
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
王琮
entrance_api
Commits
4713f4c4
Commit
4713f4c4
authored
Nov 12, 2022
by
王琮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
初始化项目
parents
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
480 additions
and
0 deletions
+480
-0
pom.xml
pom.xml
+245
-0
EntranceApiApplication.java
src/main/java/org/rcisoft/EntranceApiApplication.java
+24
-0
application-common.yml
src/main/resources/application-common.yml
+0
-0
application-dev-conf.yml
src/main/resources/application-dev-conf.yml
+50
-0
application.yml
src/main/resources/application.yml
+5
-0
logback-spring.xml
src/main/resources/logback-spring.xml
+143
-0
EntranceApiApplicationTests.java
src/test/java/org/rcisoft/EntranceApiApplicationTests.java
+13
-0
No files found.
pom.xml
0 → 100644
View file @
4713f4c4
<?xml version="1.0" encoding="UTF-8"?>
<project
xmlns=
"http://maven.apache.org/POM/4.0.0"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
org.91isoft
</groupId>
<artifactId>
entrance_api
</artifactId>
<version>
1.0-SNAPSHOT
</version>
<developers>
<developer>
<id>
0
</id>
<name>
cy
</name>
<email>
826947627@qq.com
</email>
</developer>
</developers>
<properties>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.reporting.outputEncoding>
UTF-8
</project.reporting.outputEncoding>
<java.version>
17
</java.version>
<spring.boot.version>
2.5.5
</spring.boot.version>
</properties>
<!--spring boot management-->
<dependencyManagement>
<dependencies>
<dependency>
<!--mvn 单继承 可以使用 spring-boot-dependencies 代替 parent-->
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-dependencies
</artifactId>
<version>
${spring.boot.version}
</version>
<scope>
import
</scope>
<type>
pom
</type>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>
org.91isoft
</groupId>
<artifactId>
91isoft_spbt
</artifactId>
<version>
3.0.0_nlt.35
</version>
<!-- <version>3.0.0_nlt.25</version>-->
<!-- 排除oracle12的驱动,此处代码不能提交,测试使用的是12,生产为11 -->
<!-- <exclusions>
<exclusion>
<groupId>oracle</groupId>
<artifactId>oracle-jdbc</artifactId>
</exclusion>
</exclusions>-->
</dependency>
<!-- <dependency>
<groupId>oracle</groupId>
<artifactId>oracle-jdbc</artifactId>
<version>11.0</version>
</dependency>-->
<dependency>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-starter-test
</artifactId>
<scope>
test
</scope>
</dependency>
<dependency>
<groupId>
org.projectlombok
</groupId>
<artifactId>
lombok
</artifactId>
<version>
1.18.22
</version>
</dependency>
<dependency>
<groupId>
org.redisson
</groupId>
<artifactId>
redisson
</artifactId>
<version>
3.10.1
</version>
</dependency>
<dependency>
<groupId>
org.apache.commons
</groupId>
<artifactId>
commons-lang3
</artifactId>
<version>
3.7
</version>
</dependency>
<dependency>
<groupId>
com.alibaba
</groupId>
<artifactId>
easyexcel
</artifactId>
<version>
3.1.0
</version>
</dependency>
</dependencies>
<build>
<finalName>
nlt_api
</finalName>
<resources>
<resource>
<directory>
src/main/resources
</directory>
<!--maven install deploy 需要开启以下配置-->
</resource>
</resources>
<plugins>
<plugin>
<groupId>
org.springframework.boot
</groupId>
<artifactId>
spring-boot-maven-plugin
</artifactId>
<version>
2.5.5
</version>
<configuration>
<mainClass>
org.rcisoft.EntranceApiApplication
</mainClass>
<fork>
true
</fork>
<!-- 如果没有该配置,devtools不会生效 -->
</configuration>
<executions>
<execution>
<goals>
<goal>
repackage
</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>
org.apache.maven.plugins
</groupId>
<artifactId>
maven-compiler-plugin
</artifactId>
<version>
3.8.1
</version>
<configuration>
<release>
17
</release>
<source>
17
</source>
<target>
17
</target>
</configuration>
</plugin>
<!--
<phase>package</phase> 意思是在什么阶段打包源文件
-->
<!-- 生成sources源码包的插件-->
<!--<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.4</version>
<configuration>
<attach>true</attach>
</configuration>
<executions>
<execution>
<id>attach-sources</id>
<phase>package</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>-->
</plugins>
</build>
<repositories>
<repository>
<id>
nexus-91isoft-release
</id>
<name>
local release nexus
</name>
<url>
http://nexus.91isoft.com:8081/nexus/repository/maven-releases/
</url>
<releases>
<enabled>
true
</enabled>
</releases>
<snapshots>
<enabled>
true
</enabled>
</snapshots>
</repository>
<repository>
<id>
nexus-91isoft-public
</id>
<name>
local private nexus
</name>
<url>
http://nexus.91isoft.com:8081/nexus/repository/maven-public/
</url>
<releases>
<enabled>
true
</enabled>
</releases>
<snapshots>
<enabled>
true
</enabled>
</snapshots>
</repository>
<repository>
<id>
nexus-91isoft-third
</id>
<name>
third
</name>
<url>
http://nexus.91isoft.com:8081/nexus/repository/third/
</url>
<releases>
<enabled>
true
</enabled>
</releases>
<snapshots>
<enabled>
true
</enabled>
</snapshots>
</repository>
<!--aliyun-->
<repository>
<id>
aliyun-repos
</id>
<url>
https://maven.aliyun.com/repository/public/
</url>
<snapshots>
<enabled>
false
</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>
nexus-91isoft
</id>
<url>
http://nexus.91isoft.com:8081/nexus/repository/maven-releases/
</url>
<releases>
<enabled>
true
</enabled>
</releases>
<snapshots>
<enabled>
true
</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>
nexus-91isoft-public
</id>
<url>
http://nexus.91isoft.com:8081/nexus/repository/maven-public/
</url>
<releases>
<enabled>
true
</enabled>
</releases>
<snapshots>
<enabled>
true
</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>
nexus-releases
</id>
<!--<url>http://103.249.252.109:8081/nexus/content/groups/public/</url>-->
<url>
http://maven.aliyun.com/nexus/content/groups/public/
</url>
<releases>
<enabled>
true
</enabled>
</releases>
<snapshots>
<enabled>
true
</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>
aliyun-plugin
</id>
<url>
http://maven.aliyun.com/nexus/content/groups/public/
</url>
<snapshots>
<enabled>
false
</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>
src/main/java/org/rcisoft/EntranceApiApplication.java
0 → 100644
View file @
4713f4c4
package
org
.
rcisoft
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration
;
import
org.springframework.context.annotation.EnableAspectJAutoProxy
;
import
org.springframework.scheduling.annotation.EnableScheduling
;
import
org.springframework.transaction.annotation.EnableTransactionManagement
;
import
org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity
;
import
org.mybatis.spring.annotation.MapperScan
;
@SpringBootApplication
(
exclude
=
{
DataSourceAutoConfiguration
.
class
},
scanBasePackages
=
{
"org.rcisoft"
})
@EnableTransactionManagement
@EnableAspectJAutoProxy
@EnableScheduling
@EnableGlobalMethodSecurity
(
prePostEnabled
=
true
)
@MapperScan
(
basePackages
=
{
"org.rcisoft.**.dao"
})
public
class
EntranceApiApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
EntranceApiApplication
.
class
,
args
);
}
}
src/main/resources/application-common.yml
0 → 100644
View file @
4713f4c4
This diff is collapsed.
Click to expand it.
src/main/resources/application-dev-conf.yml
0 → 100644
View file @
4713f4c4
redisIp
:
124.71.16.228
redisPort
:
6397
mqIp
:
0.0.0.0
nlt_db
:
ip
:
124.71.16.228
port
:
13307
username
:
root
password
:
root
db
:
entrance
cy
:
model
:
swagger2Config
:
true
security
:
enable
:
true
permission
:
false
defaultFilter
:
true
gateway
:
false
acAllowOrigin
:
'
*'
acAllowMethods
:
'
POST,
GET,
OPTIONS,
DELETE,PUT'
# chrome 52.0 * 不支持
acAllowHeaders
:
'
Authorization,*'
permit-all
:
permitUnStatic
:
-
"
/static/**"
-
"
/webjars/**"
-
"
/v2/**"
-
"
/swagger-resources/**"
-
"
/api-docs/**"
-
"
/auth/**"
-
"
/code/**/**"
-
"
/excelUtil/**"
#- "/cros/**"
-
"
/nlttest/add/**"
-
"
/nlttest/queryVersion/**"
#- "/**/**"
permitStatic
:
[
"
/"
,
"
/*.html"
,
"
/favicon.ico"
,
"
/**/*.html"
,
"
/**/*.js"
,
"
/**/*.css"
]
logoutSuccessUrl
:
"
/login"
loginPage
:
"
/login"
loginfailureUrl
:
"
/login-error.html"
logging
:
level
:
root
:
info
com.alibaba.nacos
:
info
src/main/resources/application.yml
0 → 100644
View file @
4713f4c4
spring
:
profiles
:
active
:
dev
group
:
dev
:
dev-conf,common
src/main/resources/logback-spring.xml
0 → 100644
View file @
4713f4c4
<?xml version="1.0" encoding="UTF-8" ?>
<configuration>
<appender
name=
"consoleLog"
class=
"ch.qos.logback.core.ConsoleAppender"
>
<layout
class=
"ch.qos.logback.classic.PatternLayout"
>
<pattern>
%white(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta(%logger{10}.%M.%L) - %cyan(%msg%n)
</pattern>
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符-->
<!--<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>-->
</layout>
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
WARN
</level>
</filter>
</appender>
<appender
name=
"fileInfoLog"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<filter
class=
"ch.qos.logback.classic.filter.LevelFilter"
>
<level>
ERROR
</level>
<onMatch>
DENY
</onMatch>
<onMismatch>
ACCEPT
</onMismatch>
</filter>
<encoder>
<pattern>
%date %-5level [%thread] %logger{43}\(%L\) : %msg
</pattern>
</encoder>
<!--滚动策略-->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!--路径-->
<fileNamePattern>
/working/test/info.%d{yyyy-MM-dd}.log
</fileNamePattern>
</rollingPolicy>
</appender>
<!--https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx50601fe1a9207d84&redirect_uri=http://gwf.natapp4.cc/sell/weixin/auth&response_type=code&scope=snsapi_userinfo&state=gwf#wechat_redirect-->
<appender
name=
"fileErrorLog"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<!--
临界值过滤器,过滤掉低于指定临界值的日志。当日志级别等于或高于临界值时,过滤器返回NEUTRAL;当日志级别低于临界值时,日志会被拒绝
-->
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
ERROR
</level>
</filter>
<encoder>
<pattern>
%date %-5level [%thread] %logger{43}\(%L\) : %msg
</pattern>
</encoder>
<!--滚动策略-->
<rollingPolicy
class=
"ch.qos.logback.core.rolling.TimeBasedRollingPolicy"
>
<!--路径-->
<fileNamePattern>
/working/test/error.%d{yyyy-MM-dd}.log
</fileNamePattern>
</rollingPolicy>
</appender>
<!--logstash配置-->
<appender
name=
"logStash"
class=
"net.logstash.logback.appender.LogstashTcpSocketAppender"
>
<destination>
101.36.228.171:4560
</destination>
<!-- 日志输出编码 -->
<encoder
charset=
"UTF-8"
class=
"net.logstash.logback.encoder.LoggingEventCompositeJsonEncoder"
>
<providers>
<timestamp>
<timeZone>
UTC
</timeZone>
</timestamp>
<pattern>
<pattern>
{
"logLevel": "%level",
"serviceName": "${springAppName:-}",
"pid": "${PID:-}",
"thread": "%thread",
"class": "%logger{40}",
"rest": "%message"
}
</pattern>
</pattern>
</providers>
</encoder>
<!--<encoder charset="UTF-8" class="net.logstash.logback.encoder.LogstashEncoder"/>-->
</appender>
<!--指定对应包名 -->
<logger
name=
"com.minlia"
level=
"DEBUG"
/>
<logger
name=
"org.springframework.data.mybatis"
level=
"DEBUG"
/>
<logger
name=
"org.springframework.aop.aspectj"
level=
"ERROR"
/>
<!--mybatis log configure-->
<!--
<logger name="com.apache.ibatis" level="TRACE"/>
<logger name="java.sql.Connection" level="DEBUG"/>
<logger name="java.sql.Statement" level="DEBUG"/>
<logger name="java.sql.PreparedStatement" level="DEBUG"/>
-->
<!-- 日志输出级别 -->
<!--
<root level="INFO">
<appender-ref ref="STDOUT"/>
<appender-ref ref="FILE"/>
</root>
-->
<springProfile
name=
"dev"
>
<root
level=
"info"
>
<appender-ref
ref=
"consoleLog"
/>
<appender-ref
ref=
"fileInfoLog"
/>
<appender-ref
ref=
"fileErrorLog"
/>
<!--<appender-ref ref="logStash" />-->
</root>
</springProfile>
<springProfile
name=
"prod"
>
<root
level=
"debug"
>
<appender-ref
ref=
"consoleLog"
/>
<appender-ref
ref=
"fileInfoLog"
/>
<appender-ref
ref=
"fileErrorLog"
/>
<!--<appender-ref ref="logStash" />-->
</root>
</springProfile>
<springProfile
name=
"kube"
>
<root
level=
"info"
>
<appender-ref
ref=
"consoleLog"
/>
<appender-ref
ref=
"fileInfoLog"
/>
<appender-ref
ref=
"fileErrorLog"
/>
<!--<appender-ref ref="logStash" />-->
</root>
</springProfile>
<springProfile
name=
"test"
>
<root
level=
"debug"
>
<appender-ref
ref=
"consoleLog"
/>
<appender-ref
ref=
"fileInfoLog"
/>
<appender-ref
ref=
"fileErrorLog"
/>
<!--<appender-ref ref="logStash" />-->
</root>
</springProfile>
</configuration>
src/test/java/org/rcisoft/EntranceApiApplicationTests.java
0 → 100644
View file @
4713f4c4
package
org
.
rcisoft
;
import
org.junit.jupiter.api.Test
;
import
org.springframework.boot.test.context.SpringBootTest
;
@SpringBootTest
class
EntranceApiApplicationTests
{
@Test
void
contextLoads
()
{
}
}
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