保存进度!
This commit is contained in:
parent
b2237d3270
commit
47b91d277a
@ -9,10 +9,8 @@
|
|||||||
<artifactId>cpicxim-huixiabao</artifactId>
|
<artifactId>cpicxim-huixiabao</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
<packaging>war</packaging>
|
<packaging>war</packaging>
|
||||||
|
<name>cpicxim-huixiabao-backend</name>
|
||||||
<name>cpicxim-huixiabao Maven Webapp</name>
|
<url>http://www.cpic.com.cn</url>
|
||||||
<!-- FIXME change it to the project's website -->
|
|
||||||
<url>http://www.example.com</url>
|
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
@ -20,6 +18,7 @@
|
|||||||
<maven.compiler.target>18</maven.compiler.target>
|
<maven.compiler.target>18</maven.compiler.target>
|
||||||
<spring.version>6.2.4</spring.version>
|
<spring.version>6.2.4</spring.version>
|
||||||
<log4j.version>2.24.3</log4j.version>
|
<log4j.version>2.24.3</log4j.version>
|
||||||
|
<jackson.version>2.18.3</jackson.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@ -30,6 +29,7 @@
|
|||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- springmvc -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-context</artifactId>
|
<artifactId>spring-context</artifactId>
|
||||||
@ -46,7 +46,6 @@
|
|||||||
<artifactId>spring-web</artifactId>
|
<artifactId>spring-web</artifactId>
|
||||||
<version>${spring.version}</version>
|
<version>${spring.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.springframework</groupId>
|
<groupId>org.springframework</groupId>
|
||||||
<artifactId>spring-webmvc</artifactId>
|
<artifactId>spring-webmvc</artifactId>
|
||||||
@ -60,6 +59,7 @@
|
|||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- log4j -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.logging.log4j</groupId>
|
<groupId>org.apache.logging.log4j</groupId>
|
||||||
<artifactId>log4j-core</artifactId>
|
<artifactId>log4j-core</artifactId>
|
||||||
@ -75,12 +75,30 @@
|
|||||||
<artifactId>log4j-api</artifactId>
|
<artifactId>log4j-api</artifactId>
|
||||||
<version>${log4j.version}</version>
|
<version>${log4j.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.apache.directory.studio</groupId>
|
<groupId>org.apache.directory.studio</groupId>
|
||||||
<artifactId>org.apache.commons.codec</artifactId>
|
<artifactId>org.apache.commons.codec</artifactId>
|
||||||
<version>1.8</version>
|
<version>1.8</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- jackson -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-databind</artifactId>
|
||||||
|
<version>${jackson.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-core</artifactId>
|
||||||
|
<version>${jackson.version}</version>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.fasterxml.jackson.core</groupId>
|
||||||
|
<artifactId>jackson-annotations</artifactId>
|
||||||
|
<version>${jackson.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
@ -103,7 +121,7 @@
|
|||||||
<artifactId>maven-war-plugin</artifactId>
|
<artifactId>maven-war-plugin</artifactId>
|
||||||
<version>3.4.0</version>
|
<version>3.4.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<outputDirectory>${project.build.directory}/../../../../输出/back/</outputDirectory>
|
<outputDirectory>${project.build.directory}/../../../输出/back/</outputDirectory>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
|
@ -0,0 +1,54 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
*
|
||||||
|
* @Date: 2025-03-15 17:09:50
|
||||||
|
*
|
||||||
|
* @LastEditors: Kane
|
||||||
|
*
|
||||||
|
* @FilePath: /cpicxim-huixiabao/src/main/java/com/cpic/xim/huixiabao/web/controllers/MediCover/MediCoverController.java
|
||||||
|
*
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package com.cpic.xim.huixiabao.web.controllers.MediCover;
|
||||||
|
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.ResponseBody;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import com.cpic.xim.utils.secrecy.*;;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
@RequestMapping( "/huixiabao" )
|
||||||
|
public class MediCoverController
|
||||||
|
{
|
||||||
|
private static Logger logger = LoggerFactory.getLogger( MediCoverController.class );
|
||||||
|
private static String privateKey = "MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAMBanAXTnHChd6W/vYq6eVmmr1R2p25tghivDEb8qrgxHMCY3lqYhJAw3jgQAH3HzSOFxZ3Mz/WcRaW3CzWfAZ0mm5dcVY0qEgyT/1BOsdhLwKa3BBuURRCEp5ZPapErm3Ugl/OBxjEURgtc9JnVBOECc9Kvk3FXvuN4tDWl18lxAgMBAAECgYBBAJ3HLkqomTg4sAIaloeZr0WC0pIkNCeJteX9OzdqBVbFEyPZE7+AhrMh2O6BkvqU7YjpmaQRSR0UMjY8iZ5eaJ8vkPJPFgoJI14dqj3Pby46GYqC8iPHTeFN35RL6Sgktt9i/loLoiRj6ifQ2AqnlE3e66Iaw1Zdnx1Lt9/T7QJBAP6PZatPD4UM9kQ0xO1QmJ+IsgLBhv3fhn2i8X4NSJGJ1yi9+JWnQ+CfBZ2u/V0op1Wz5kIDK7BA40o2Ntlf6acCQQDBcSNGlyE5sSSJS39pnbTqxNjKoakBQ5LFIrk4ld8Vuk0H7dcdfUittHoDnNMn9TKIIAvxo0s4fQe8WMPqH2cnAkEA4x49r6JSTntKHYCXUsTd5zim2h6gulF8RQvkOnrPjEpXVVppN9yMixRWhmFiXIOxCJ4BilQZ3p+GKuhD953DcQJBAKdGjpqcVb7t0AppnuRV2/yn/FA9O0g8hs6yGDk2YJMJZ1NT+JEnpZGQX3KASphjEC9mhu2Np55RgD7/A2uRfEECQQCdyFLVuPMSnCRAXvwb0EegaM0sS4/bT3/fix7RpKqv7tsUfXXsL1bbxxp9b/FBJe834s6wqq0U2wTlfVHXD1Oh";
|
||||||
|
private static String publicyKey = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDAWpwF05xwoXelv72KunlZpq9UdqdubYIYrwxG/Kq4MRzAmN5amISQMN44EAB9x80jhcWdzM/1nEWltws1nwGdJpuXXFWNKhIMk/9QTrHYS8CmtwQblEUQhKeWT2qRK5t1IJfzgcYxFEYLXPSZ1QThAnPSr5NxV77jeLQ1pdfJcQIDAQAB";
|
||||||
|
|
||||||
|
@PostMapping( "/xyx" )
|
||||||
|
@ResponseBody
|
||||||
|
public static MediCoverResponse getHmbXyxInfo(
|
||||||
|
@RequestBody MediCoverRequestBody request
|
||||||
|
)
|
||||||
|
{
|
||||||
|
MediCoverResponse response = new MediCoverResponse();
|
||||||
|
ObjectMapper jsonMapper = new ObjectMapper();
|
||||||
|
|
||||||
|
String decryptData = AESUtils.decryptData( request.getKey(), privateKey, request.getBizContent() );
|
||||||
|
|
||||||
|
logger.info( "【接收小药箱数据】请求参数<{}>", request.toString() );
|
||||||
|
logger.info( "【接收小药箱数据】解密参数<{}>", decryptData );
|
||||||
|
|
||||||
|
// jsonMapper.readValue(decryptData, null)
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,107 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
*
|
||||||
|
* @Date: 2025-03-15 16:41:05
|
||||||
|
*
|
||||||
|
* @LastEditors: Kane
|
||||||
|
*
|
||||||
|
* @FilePath:
|
||||||
|
* /cpicxim-huixiabao/src/main/java/com/cpic/xim/huixiabao/web/controllers/MediCover/MediCoverRequestBody.java
|
||||||
|
* /cpicxim-huixiabao/src/main/java/com/cpic/xim/huixiabao/web/controllers/MediCover/MediCoverRequestBody.java
|
||||||
|
*
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package com.cpic.xim.huixiabao.web.controllers.MediCover;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
public class MediCoverRequestBody
|
||||||
|
{
|
||||||
|
|
||||||
|
@JsonProperty( "transId" )
|
||||||
|
private String transId;
|
||||||
|
|
||||||
|
@JsonProperty( "format" )
|
||||||
|
private String format;
|
||||||
|
|
||||||
|
@JsonProperty( "bizContent" )
|
||||||
|
private String bizContent;
|
||||||
|
|
||||||
|
@JsonProperty( "key" )
|
||||||
|
private String key;
|
||||||
|
|
||||||
|
@JsonProperty( "timestamp" )
|
||||||
|
private String timestamp;
|
||||||
|
|
||||||
|
public MediCoverRequestBody(
|
||||||
|
String transId,
|
||||||
|
String format,
|
||||||
|
String bizContent,
|
||||||
|
String key,
|
||||||
|
String timestamp
|
||||||
|
)
|
||||||
|
{
|
||||||
|
this.transId = transId;
|
||||||
|
this.format = format;
|
||||||
|
this.bizContent = bizContent;
|
||||||
|
this.key = key;
|
||||||
|
this.timestamp = timestamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTransId()
|
||||||
|
{
|
||||||
|
return transId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTransId( String transId )
|
||||||
|
{
|
||||||
|
this.transId = transId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getFormat()
|
||||||
|
{
|
||||||
|
return format;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFormat( String format )
|
||||||
|
{
|
||||||
|
this.format = format;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getBizContent()
|
||||||
|
{
|
||||||
|
return bizContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBizContent( String bizContent )
|
||||||
|
{
|
||||||
|
this.bizContent = bizContent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKey()
|
||||||
|
{
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKey( String key )
|
||||||
|
{
|
||||||
|
this.key = key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getTimestamp()
|
||||||
|
{
|
||||||
|
return timestamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setTimestamp( String timestamp )
|
||||||
|
{
|
||||||
|
this.timestamp = timestamp;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override public String toString()
|
||||||
|
{
|
||||||
|
return "MediCoverRequestBody [transId=" + transId + ", format=" + format + ", bizContent=" + bizContent + ", key=" + key + ", timestamp=" + timestamp + "]";
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,54 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
* @Date: 2025-03-15 17:21:50
|
||||||
|
* @LastEditors: Kane
|
||||||
|
* @FilePath: /cpicxim-huixiabao/src/main/java/com/cpic/xim/huixiabao/web/controllers/MediCover/MediCoverResponse.java
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package com.cpic.xim.huixiabao.web.controllers.MediCover;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
public class MediCoverResponse
|
||||||
|
{
|
||||||
|
MediCoverResponse()
|
||||||
|
{
|
||||||
|
code = "500";
|
||||||
|
message = "未知失败原因";
|
||||||
|
subMessage = "";
|
||||||
|
result = new MediCoverResultInResponse("", "");
|
||||||
|
success = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public MediCoverResponse(
|
||||||
|
String code,
|
||||||
|
String message,
|
||||||
|
String subMessage,
|
||||||
|
String key,
|
||||||
|
String content,
|
||||||
|
Boolean success )
|
||||||
|
{
|
||||||
|
this.code = code;
|
||||||
|
this.message = message;
|
||||||
|
this.subMessage = subMessage;
|
||||||
|
this.result = new MediCoverResultInResponse(key, content);
|
||||||
|
this.success = success;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonProperty("code")
|
||||||
|
private String code;
|
||||||
|
|
||||||
|
@JsonProperty("message")
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
@JsonProperty("subMessage")
|
||||||
|
private String subMessage;
|
||||||
|
|
||||||
|
@JsonProperty("result")
|
||||||
|
private MediCoverResultInResponse result;
|
||||||
|
|
||||||
|
@JsonProperty("success")
|
||||||
|
private Boolean success;
|
||||||
|
}
|
@ -0,0 +1,55 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
*
|
||||||
|
* @Date: 2025-03-15 17:29:27
|
||||||
|
*
|
||||||
|
* @LastEditors: Kane
|
||||||
|
*
|
||||||
|
* @FilePath:
|
||||||
|
* /cpicxim-huixiabao/src/main/java/com/cpic/xim/huixiabao/web/controllers/MediCover/MediCoverResultInResponse.java
|
||||||
|
* /cpicxim-huixiabao/src/main/java/com/cpic/xim/huixiabao/web/controllers/MediCover/MediCoverResultInResponse.java
|
||||||
|
* /cpicxim-huixiabao/src/main/java/com/cpic/xim/huixiabao/web/controllers/MediCover/MediCoverResultInResponse.java
|
||||||
|
*
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
package com.cpic.xim.huixiabao.web.controllers.MediCover;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
public class MediCoverResultInResponse
|
||||||
|
{
|
||||||
|
|
||||||
|
public MediCoverResultInResponse( String key, String content )
|
||||||
|
{
|
||||||
|
this.key = key;
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKey()
|
||||||
|
{
|
||||||
|
return key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setKey( String key )
|
||||||
|
{
|
||||||
|
this.key = key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent()
|
||||||
|
{
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setContent( String content )
|
||||||
|
{
|
||||||
|
this.content = content;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonProperty( "key" )
|
||||||
|
private String key;
|
||||||
|
|
||||||
|
@JsonProperty( "content" )
|
||||||
|
private String content;
|
||||||
|
}
|
@ -0,0 +1,86 @@
|
|||||||
|
/*
|
||||||
|
* @Author: Kane
|
||||||
|
*
|
||||||
|
* @Date: 2025-03-15 18:28:17
|
||||||
|
*
|
||||||
|
* @LastEditors: Kane
|
||||||
|
*
|
||||||
|
* @FilePath: /cpicxim-huixiabao/src/main/java/com/cpic/xim/huixiabao/web/data/nhs/HmbXyxInfo.java
|
||||||
|
*
|
||||||
|
* @Description: 惠厦保 小药箱数据同步对象。
|
||||||
|
* 对应惠厦保理赔规范接口 3.7。
|
||||||
|
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.cpic.xim.huixiabao.web.data.nhs;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
|
||||||
|
public class HmbXyxInfo
|
||||||
|
{
|
||||||
|
|
||||||
|
public String getPsnName()
|
||||||
|
{
|
||||||
|
return psnName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPsnName( String psnName )
|
||||||
|
{
|
||||||
|
this.psnName = psnName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCertno()
|
||||||
|
{
|
||||||
|
return certno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCertno( String certno )
|
||||||
|
{
|
||||||
|
this.certno = certno;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getServiceId()
|
||||||
|
{
|
||||||
|
return serviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setServiceId( String serviceId )
|
||||||
|
{
|
||||||
|
this.serviceId = serviceId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getStatus()
|
||||||
|
{
|
||||||
|
return status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatus( String status )
|
||||||
|
{
|
||||||
|
this.status = status;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getXyxNo()
|
||||||
|
{
|
||||||
|
return xyxNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setXyxNo( String xyxNo )
|
||||||
|
{
|
||||||
|
this.xyxNo = xyxNo;
|
||||||
|
}
|
||||||
|
|
||||||
|
@JsonProperty( "psnName" )
|
||||||
|
private String psnName;
|
||||||
|
|
||||||
|
@JsonProperty( "certno" )
|
||||||
|
private String certno;
|
||||||
|
|
||||||
|
@JsonProperty( "serviceId" )
|
||||||
|
private String serviceId;
|
||||||
|
|
||||||
|
@JsonProperty( "status" )
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
@JsonProperty( "xyxNo" )
|
||||||
|
private String xyxNo;
|
||||||
|
}
|
@ -1,11 +1,15 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2025-03-15 12:04:19
|
|
||||||
* @LastEditors: Kane
|
|
||||||
* @FilePath: /cpicxim-huixiabao/src/main/java/com/cpic/xim/utils/secrecy/Base64Utils.java
|
|
||||||
* @Description:
|
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
* @Date: 2025-03-15 12:04:19
|
||||||
|
*
|
||||||
|
* @LastEditors: Kane
|
||||||
|
*
|
||||||
|
* @FilePath: /cpicxim-huixiabao/src/main/java/com/cpic/xim/utils/secrecy/Base64Utils.java
|
||||||
|
*
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
package com.cpic.xim.utils.secrecy;
|
package com.cpic.xim.utils.secrecy;
|
||||||
|
|
||||||
@ -34,14 +38,12 @@ public class Base64Utils
|
|||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static byte[] decode( String base64 )
|
public static byte[] decode( String base64 ) throws Exception
|
||||||
throws Exception
|
|
||||||
{
|
{
|
||||||
return Base64.decodeBase64( base64.getBytes() );
|
return Base64.decodeBase64( base64.getBytes() );
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String decode( byte[] b )
|
public static String decode( byte[] b ) throws Exception
|
||||||
throws Exception
|
|
||||||
{
|
{
|
||||||
return new String( Base64.decodeBase64( b ) );
|
return new String( Base64.decodeBase64( b ) );
|
||||||
}
|
}
|
||||||
|
@ -1,14 +1,18 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2025-03-15 11:56:54
|
|
||||||
* @LastEditors: Kane
|
|
||||||
* @FilePath: /cpicxim-huixiabao/src/main/java/com/cpic/xim/huixiabao/web/filters/cros/CrosFilter.java
|
|
||||||
* @Description:
|
|
||||||
*
|
*
|
||||||
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
* @Date: 2025-03-15 11:56:54
|
||||||
|
*
|
||||||
|
* @LastEditors: Kane
|
||||||
|
*
|
||||||
|
* @FilePath: /cpicxim-huixiabao/src/main/java/com/cpic/xim/web/filters/cros/CrosFilter.java
|
||||||
|
*
|
||||||
|
* @Description:
|
||||||
|
*
|
||||||
|
* Copyright (c) ${2023} by Kane, All Rights Reserved.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package com.cpic.xim.huixiabao.web.filters.cros;
|
package com.cpic.xim.web.filters.cros;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import javax.servlet.Filter;
|
import javax.servlet.Filter;
|
40
code/cpicxim-huixiabao/src/main/resources/log4j2.xml
Normal file
40
code/cpicxim-huixiabao/src/main/resources/log4j2.xml
Normal file
@ -0,0 +1,40 @@
|
|||||||
|
<Configuration status="WARN" monitorInterval="300">
|
||||||
|
<Appenders>
|
||||||
|
<Console name="Console" target="SYSTEM_OUT">
|
||||||
|
<PatternLayout pattern="%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} ### %msg%n" />
|
||||||
|
<ThresholdFilter level="trace" onMatch="ACCEPT" onMismatch="DENY" />
|
||||||
|
</Console>
|
||||||
|
<RollingFile name="rolling_file_win"
|
||||||
|
filePattern="./logs/huixiabao/$${date:yyyy-MM}/huixiabao-%d{MM-dd-yyyy}-%i.log.gz">
|
||||||
|
<PatternLayout>
|
||||||
|
<Pattern>[%t][%level][%d{HH:mm:ss.SSS}][%logger.%M{36}#%L] %msg%n</Pattern>
|
||||||
|
</PatternLayout>
|
||||||
|
<Policies>
|
||||||
|
<TimeBasedTriggeringPolicy interval="1" />
|
||||||
|
<SizeBasedTriggeringPolicy size="20MB" />
|
||||||
|
<DefaultRolloverStrategy max="20" />
|
||||||
|
</Policies>
|
||||||
|
</RollingFile>
|
||||||
|
<RollingFile name="rolling_file_linux"
|
||||||
|
filePattern="/logs/huixiabao/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz">
|
||||||
|
<PatternLayout>
|
||||||
|
<Pattern>[%t][%level][%d{HH:mm:ss.SSS}][%logger.%M{36}#%L] %msg%n</Pattern>
|
||||||
|
</PatternLayout>
|
||||||
|
<Policies>
|
||||||
|
<TimeBasedTriggeringPolicy interval="1" />
|
||||||
|
<SizeBasedTriggeringPolicy size="20MB" />
|
||||||
|
<DefaultRolloverStrategy max="20" />
|
||||||
|
</Policies>
|
||||||
|
</RollingFile>
|
||||||
|
</Appenders>
|
||||||
|
<Loggers>
|
||||||
|
<!-- <Logger name="mylog" level="info">
|
||||||
|
<AppenderRef ref="rolling_file" />
|
||||||
|
</Logger> -->
|
||||||
|
<Root level="debug">
|
||||||
|
<AppenderRef ref="rolling_file_linux" />
|
||||||
|
<AppenderRef ref="rolling_file_win" />
|
||||||
|
<AppenderRef ref="Console" />
|
||||||
|
</Root>
|
||||||
|
</Loggers>
|
||||||
|
</Configuration>
|
@ -22,4 +22,13 @@
|
|||||||
<url-pattern>/huixibao</url-pattern>
|
<url-pattern>/huixibao</url-pattern>
|
||||||
</servlet-mapping>
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<filter>
|
||||||
|
<filter-name>CrosFilter</filter-name>
|
||||||
|
<filter-class>com.cpic.xim.web.filters.cros.CrosFilter</filter-class>
|
||||||
|
</filter>
|
||||||
|
<filter-mapping>
|
||||||
|
<filter-name>CrosFilter</filter-name>
|
||||||
|
<url-pattern>*</url-pattern>
|
||||||
|
</filter-mapping>
|
||||||
|
|
||||||
</web-app>
|
</web-app>
|
Loading…
x
Reference in New Issue
Block a user