1. 修正部分模块单测报错
This commit is contained in:
parent
5f00cf75b2
commit
186af5f9de
|
@ -83,6 +83,7 @@ pagehelper :
|
||||||
#config log
|
#config log
|
||||||
logging :
|
logging :
|
||||||
config: file:config/logback.xml
|
config: file:config/logback.xml
|
||||||
|
|
||||||
log4j :
|
log4j :
|
||||||
logger:
|
logger:
|
||||||
org:
|
org:
|
||||||
|
|
|
@ -0,0 +1,111 @@
|
||||||
|
server :
|
||||||
|
port : 9276
|
||||||
|
servlet :
|
||||||
|
context-path: /cmhi
|
||||||
|
compression:
|
||||||
|
# 开启响应压缩
|
||||||
|
enabled : true
|
||||||
|
mime-types :
|
||||||
|
- application/json # RESTful API JSON
|
||||||
|
# 进行压缩的最小体积
|
||||||
|
min-response-size: 1KB
|
||||||
|
|
||||||
|
# Crypto Configure
|
||||||
|
jasypt :
|
||||||
|
encryptor:
|
||||||
|
algorithm: PBEWITHHMACSHA512ANDAES_256
|
||||||
|
password :
|
||||||
|
|
||||||
|
spring :
|
||||||
|
mvc :
|
||||||
|
throw-exception-if-no-handler-found: true
|
||||||
|
web :
|
||||||
|
resources:
|
||||||
|
add-mappings: false
|
||||||
|
|
||||||
|
jackson :
|
||||||
|
date-format : yyyy-MM-dd HH:mm:ss.SSS
|
||||||
|
timezone : GMT+8
|
||||||
|
default-property-inclusion: non_null
|
||||||
|
mapper :
|
||||||
|
default-view-inclusion: true
|
||||||
|
deserialization :
|
||||||
|
fail-on-unknown-properties: false
|
||||||
|
|
||||||
|
datasource:
|
||||||
|
#url : jdbc:mysql://xajhuang.com:3307/common_framework?serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull&useUnicode=true
|
||||||
|
url : jdbc:mysql://localhost:3306/common_framework?serverTimezone=Asia/Shanghai&zeroDateTimeBehavior=convertToNull&useUnicode=true
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
#username : xajhuang
|
||||||
|
#password : wkj!nky5cjb!GMV6guq
|
||||||
|
username : root
|
||||||
|
password : aaaHuang1
|
||||||
|
dbcp2 :
|
||||||
|
max-total : 128
|
||||||
|
max-wait-millis : 10000
|
||||||
|
max-idle : 32
|
||||||
|
min-idle : 8
|
||||||
|
initial-size : 8
|
||||||
|
validation-query : SELECT 1
|
||||||
|
test-while-idle : true
|
||||||
|
connection-properties:
|
||||||
|
characterEncoding: utf8
|
||||||
|
|
||||||
|
sql :
|
||||||
|
init:
|
||||||
|
encoding : utf8
|
||||||
|
schema-locations: classpath:rbac/schema.sql
|
||||||
|
data-locations : classpath:rbac/data.sql
|
||||||
|
# ALWAYS/EMBEDDED/NEVER
|
||||||
|
mode : always
|
||||||
|
enabled : true
|
||||||
|
|
||||||
|
|
||||||
|
#mybatis
|
||||||
|
mybatis :
|
||||||
|
mapper-locations : classpath*:mappers/*.xml
|
||||||
|
type-aliases-package: com.cmhi.gds.pojo.entry
|
||||||
|
configuration :
|
||||||
|
default-enum-type-handler: com.cf.cs.database.common.DataBaseEnumHandler
|
||||||
|
|
||||||
|
mybatis-flex:
|
||||||
|
global-config:
|
||||||
|
print-banner: false
|
||||||
|
|
||||||
|
#pagehelper
|
||||||
|
pagehelper :
|
||||||
|
helper-dialect : mysql
|
||||||
|
reasonable : true
|
||||||
|
support-methods-arguments: true
|
||||||
|
pageSizeZero : true
|
||||||
|
params.count : countSql
|
||||||
|
|
||||||
|
#config log
|
||||||
|
# logging :
|
||||||
|
# config: file:config/logback.xml
|
||||||
|
|
||||||
|
log4j :
|
||||||
|
logger:
|
||||||
|
org:
|
||||||
|
mybatis: info
|
||||||
|
|
||||||
|
# swagger-ui custom path
|
||||||
|
springdoc :
|
||||||
|
swagger-ui:
|
||||||
|
path: /swagger-ui.html
|
||||||
|
|
||||||
|
# JWT configure
|
||||||
|
jwt :
|
||||||
|
http-head : Authorization
|
||||||
|
secret-key : MTIzNDU2Nzg=
|
||||||
|
expire-time: 604800
|
||||||
|
|
||||||
|
# 字典配置
|
||||||
|
system :
|
||||||
|
dict:
|
||||||
|
raw-value : true
|
||||||
|
cache :
|
||||||
|
enabled: true
|
||||||
|
controller:
|
||||||
|
enabled: false
|
||||||
|
prefix : /dict
|
|
@ -67,6 +67,16 @@
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<argLine>-Dspring.config.location=file:${project.parent.basedir}/config/</argLine>
|
||||||
|
<additionalClasspathElements>
|
||||||
|
<additionalClasspathElement>${project.parent.basedir}</additionalClasspathElement>
|
||||||
|
</additionalClasspathElements>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,26 @@
|
||||||
package com.cf.cs.authentication;
|
package com.cf.cs.authentication;
|
||||||
|
|
||||||
|
import com.cf.cs.authentication.configure.SecuritySecurity;
|
||||||
|
import com.cf.cs.authentication.configure.UserSecurityConfigure;
|
||||||
|
import com.cf.cs.base.config.CacheConfigure;
|
||||||
|
import com.cf.cs.base.config.CommonConfigure;
|
||||||
|
import com.cf.cs.base.config.ObjectMapperProvider;
|
||||||
|
import com.cf.cs.database.config.MybatisFlexConfigure;
|
||||||
|
import com.cf.cs.protocol.config.ProtocolConfigure;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
import org.springframework.test.context.ActiveProfiles;
|
||||||
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type Cs authentication application tests.
|
* The type Cs authentication application tests.
|
||||||
*
|
*
|
||||||
* @author xajhuang @163.com
|
* @author xajhuang @163.com
|
||||||
*/
|
*/
|
||||||
@SpringBootTest
|
@SpringBootTest(classes = {CsAuthenticationApplication.class})
|
||||||
|
@ActiveProfiles({"user", "test"})
|
||||||
|
@ContextConfiguration(classes = {CacheConfigure.class, CommonConfigure.class, ObjectMapperProvider.class, MybatisFlexConfigure.class,
|
||||||
|
UserSecurityConfigure.class, SecuritySecurity.class, ProtocolConfigure.class})
|
||||||
class CsAuthenticationApplicationTests {
|
class CsAuthenticationApplicationTests {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -74,6 +74,12 @@
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<argLine>-Dspring.config.location=file:${project.parent.basedir}/config/</argLine>
|
||||||
|
<additionalClasspathElements>
|
||||||
|
<additionalClasspathElement>${project.parent.basedir}</additionalClasspathElement>
|
||||||
|
</additionalClasspathElements>
|
||||||
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
package com.cf.cs.database;
|
package com.cf.cs.database;
|
||||||
|
|
||||||
|
import com.cf.cs.base.config.CacheConfigure;
|
||||||
|
import com.cf.cs.base.config.CommonConfigure;
|
||||||
|
import com.cf.cs.base.config.ObjectMapperProvider;
|
||||||
|
import com.cf.cs.database.config.MybatisFlexConfigure;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.test.context.ActiveProfiles;
|
import org.springframework.test.context.ActiveProfiles;
|
||||||
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type Cs database application tests.
|
* The type Cs database application tests.
|
||||||
|
@ -10,7 +15,9 @@ import org.springframework.test.context.ActiveProfiles;
|
||||||
* @author xajhuang @163.com
|
* @author xajhuang @163.com
|
||||||
*/
|
*/
|
||||||
@SpringBootTest(classes = {CsDatabaseApplication.class})
|
@SpringBootTest(classes = {CsDatabaseApplication.class})
|
||||||
@ActiveProfiles({"user", "local"})
|
@ActiveProfiles({"user", "test"})
|
||||||
|
@ContextConfiguration(classes = {CacheConfigure.class, CommonConfigure.class, ObjectMapperProvider.class,
|
||||||
|
MybatisFlexConfigure.class})
|
||||||
class CsDatabaseApplicationTests {
|
class CsDatabaseApplicationTests {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -58,6 +58,16 @@
|
||||||
<classifier>exec</classifier>
|
<classifier>exec</classifier>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
|
<configuration>
|
||||||
|
<argLine>-Dspring.config.location=file:${project.parent.basedir}/config/</argLine>
|
||||||
|
<additionalClasspathElements>
|
||||||
|
<additionalClasspathElement>${project.parent.basedir}</additionalClasspathElement>
|
||||||
|
</additionalClasspathElements>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,24 @@
|
||||||
package com.cf.cs.protocol;
|
package com.cf.cs.protocol;
|
||||||
|
|
||||||
|
import com.cf.cs.base.config.CacheConfigure;
|
||||||
|
import com.cf.cs.base.config.CommonConfigure;
|
||||||
|
import com.cf.cs.base.config.ObjectMapperProvider;
|
||||||
|
import com.cf.cs.database.config.MybatisFlexConfigure;
|
||||||
|
import com.cf.cs.protocol.config.ProtocolConfigure;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
import org.springframework.test.context.ActiveProfiles;
|
||||||
|
import org.springframework.test.context.ContextConfiguration;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type Cs protocol application tests.
|
* The type Cs protocol application tests.
|
||||||
*
|
*
|
||||||
* @author xajhuang @163.com
|
* @author xajhuang @163.com
|
||||||
*/
|
*/
|
||||||
@SpringBootTest
|
@SpringBootTest(classes = {CsProtocolApplication.class})
|
||||||
|
@ActiveProfiles({"user", "test"})
|
||||||
|
@ContextConfiguration(classes = {CacheConfigure.class, CommonConfigure.class, ObjectMapperProvider.class, MybatisFlexConfigure.class,
|
||||||
|
ProtocolConfigure.class})
|
||||||
class CsProtocolApplicationTests {
|
class CsProtocolApplicationTests {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -68,25 +68,21 @@
|
||||||
<groupId>com.cf.cs</groupId>
|
<groupId>com.cf.cs</groupId>
|
||||||
<artifactId>cs-database</artifactId>
|
<artifactId>cs-database</artifactId>
|
||||||
<version>${cs-package.version}</version>
|
<version>${cs-package.version}</version>
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.cf.cs</groupId>
|
<groupId>com.cf.cs</groupId>
|
||||||
<artifactId>cs-protocol</artifactId>
|
<artifactId>cs-protocol</artifactId>
|
||||||
<version>${cs-package.version}</version>
|
<version>${cs-package.version}</version>
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.cf.cs</groupId>
|
<groupId>com.cf.cs</groupId>
|
||||||
<artifactId>cs-crypto</artifactId>
|
<artifactId>cs-crypto</artifactId>
|
||||||
<version>${cs-package.version}</version>
|
<version>${cs-package.version}</version>
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.cf.cs</groupId>
|
<groupId>com.cf.cs</groupId>
|
||||||
<artifactId>cs-authentication</artifactId>
|
<artifactId>cs-authentication</artifactId>
|
||||||
<version>${cs-package.version}</version>
|
<version>${cs-package.version}</version>
|
||||||
<scope>compile</scope>
|
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue