Sfoglia il codice sorgente

pom 引入swagger和flowable

master
PoffyZhang 1 anno fa
parent
commit
a1393973c6
5 ha cambiato i file con 173 aggiunte e 16 eliminazioni
  1. +20
    -15
      pmapi/pom.xml
  2. +78
    -1
      pmapi/src/main/resources/application-dev.yml
  3. +68
    -0
      pmapi/src/main/resources/logback-spring.xml
  4. +2
    -0
      pmapi/src/main/resources/security/auth-dev.yml
  5. +5
    -0
      pom.xml

+ 20
- 15
pmapi/pom.xml Vedi File

@@ -63,20 +63,6 @@
<artifactId>tomcat-embed-core</artifactId>
</dependency>
<dependency>
<groupId>com.ningdatech</groupId>
<artifactId>nd-swagger2-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.ningdatech</groupId>
<artifactId>nd-flowable-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
@@ -241,7 +227,26 @@
<dependency>
<groupId>com.ningdatech</groupId>
<artifactId>nd-basic</artifactId>
<version>1.0.0</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.ningdatech</groupId>
<artifactId>nd-swagger2-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.ningdatech</groupId>
<artifactId>nd-flowable-starter</artifactId>
</dependency>
</dependencies>
<!-- 打包 -->


+ 78
- 1
pmapi/src/main/resources/application-dev.yml Vedi File

@@ -2,5 +2,82 @@ server:
port: 28888
servlet:
context-path: /pm

spring:
mvc:
pathmatch:
matching-strategy: ant_path_matcher
session:
store-type: redis
redis:
namespace: "spring:session"
redis:
timeout: 5000
host: 47.98.125.47
port: 26379
database: 0
password: Ndkj1234
jedis:
pool:
max-active: 200
max-idle: 500
min-idle: 8
max-wait: 10000
application:
name: cm
jackson:
default-property-inclusion: non_null
time-zone: GMT+8
date-format: yyyy-MM-dd HH:mm:ss
datasource:
url: jdbc:mysql://localhost:3306/wflow?useSSL=false&useUnicode=true&characterEncoding=utf8
driverClassName: com.mysql.jdbc.Driver
username: root
password: 123456
druid:
max-wait: 10000
min-idle: 5
max-active: 100

#邮件发送配置
mail:
host:
username:
password:
protocol: smtps
default-encoding: UTF-8
properties:
default-encoding: utf-8
mail:
smtp:
port: 465
auth: true
starttls:
enable: true
required: true

logging:
config: classpath:logback-spring.xml
config: classpath:logback-spring.xml
#日志配置
level:
root: info
file:
path: logs
nd:
log:
enabled: true
type: DB
# 日志文件配置
log:
path: ./logs
info:
file-size: 50MB
max-size: 5
total-size: 200MB
error:
file-size: 10MB
max-size: 5
total-size: 50MB

swagger:
enabled: true

+ 68
- 0
pmapi/src/main/resources/logback-spring.xml Vedi File

@@ -0,0 +1,68 @@
<configuration scan="true" scanPeriod="10 seconds">
<springProperty name="logPath" scope="context" source="log.path" defaultValue="./logs"/>
<springProperty name="infoFileSize" scope="context" source="log.info.file-size"/>
<springProperty name="infoMaxSize" scope="context" source="log.info.max-size"/>
<springProperty name="infoTotalSize" scope="context" source="log.info.total-size"/>
<springProperty name="errorFileSize" scope="context" source="log.error.file-size"/>
<springProperty name="errorMaxSize" scope="context" source="log.error.max-size"/>
<springProperty name="errorTotalSize" scope="context" source="log.error.total-size"/>

<appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>${logPath}/info.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${logPath}/info-%d{yyyyMMdd}-%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>${infoFileSize}</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<maxHistory>${infoMaxSize}</maxHistory>
<totalSizeCap>${infoTotalSize}</totalSizeCap>
</rollingPolicy>
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} -%msg%n
</Pattern>
</layout>
<charset>UTF-8</charset>
</encoder>
</appender>

<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>
<File>${logPath}/error.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${logPath}/error-%d{yyyyMMdd}-%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>${errorFileSize}</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<maxHistory>${errorMaxSize}</maxHistory>
<totalSizeCap>${errorTotalSize}</totalSizeCap>
</rollingPolicy>
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} -%msg%n
</Pattern>
</layout>
<charset>UTF-8</charset>
</encoder>
</appender>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>
%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} -%msg%n
</pattern>
<charset>UTF-8</charset>
</encoder>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>DEBUG</level>
</filter>
</appender>

<root level="INFO">
<appender-ref ref="INFO_FILE"/>
<appender-ref ref="ERROR_FILE"/>
<appender-ref ref="STDOUT"/>
</root>
</configuration>

+ 2
- 0
pmapi/src/main/resources/security/auth-dev.yml Vedi File

@@ -18,6 +18,7 @@ security:
- /doc.html
- /ok.html
- /open/api/**
- /oa/**
ignore-csrf-urls:
- /api/v1/user/auth/**
- /v2/api-docs
@@ -31,6 +32,7 @@ security:
- /file/**
- /optLog/**
- /dict/**
- /oa/**
role-map:
"engineer":
"project_manager":


+ 5
- 0
pom.xml Vedi File

@@ -88,6 +88,11 @@
</dependency>
<dependency>
<groupId>com.ningdatech</groupId>
<artifactId>nd-basic</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.ningdatech</groupId>
<artifactId>nd-swagger2-starter</artifactId>
<version>1.0.0</version>
</dependency>


Loading…
Annulla
Salva