Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
Details
Activity
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
fangxinjiang
yifu-mvp
Commits
b40a2da0
Commit
b40a2da0
authored
Nov 22, 2024
by
wangpeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
邮件测试
parent
c00df26d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
9 deletions
+56
-9
CustomerBusinessContoller.java
...1/yifu/archives/controller/CustomerBusinessContoller.java
+8
-0
application.yml
...ives/yifu-archives-biz/src/main/resources/application.yml
+1
-1
logback-spring.xml
...s/yifu-archives-biz/src/main/resources/logback-spring.xml
+47
-8
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/controller/CustomerBusinessContoller.java
View file @
b40a2da0
...
@@ -33,6 +33,7 @@ import lombok.extern.slf4j.Slf4j;
...
@@ -33,6 +33,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.cache.CacheManager
;
import
org.springframework.cache.CacheManager
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.validation.Valid
;
import
javax.validation.Valid
;
import
java.util.*
;
import
java.util.*
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
...
@@ -62,6 +63,13 @@ public class CustomerBusinessContoller {
...
@@ -62,6 +63,13 @@ public class CustomerBusinessContoller {
private
final
UpmsDaprUtils
upmsDaprUtils
;
private
final
UpmsDaprUtils
upmsDaprUtils
;
private
final
CacheManager
cacheManager
;
private
final
CacheManager
cacheManager
;
@GetMapping
(
"/errEMail"
)
public
R
<
String
>
errEMail
(
HttpServletRequest
request
)
throws
Exception
{
throw
new
Exception
(
"errEMail异常测试!"
);
}
/**
/**
* 简单分页查询
* 简单分页查询
* @param page 分页对象
* @param page 分页对象
...
...
yifu-archives/yifu-archives-biz/src/main/resources/application.yml
View file @
b40a2da0
...
@@ -53,7 +53,7 @@ security:
...
@@ -53,7 +53,7 @@ security:
-
/tpreempmain/getPhoneByCardAndName
-
/tpreempmain/getPhoneByCardAndName
-
/tpreempmain/sendCode
-
/tpreempmain/sendCode
-
/tpreempmain/checkCode
-
/tpreempmain/checkCode
-
/customerBusiness/customerInfo/errEMail
# 文件上传相关 支持阿里云、华为云、腾讯、minio
# 文件上传相关 支持阿里云、华为云、腾讯、minio
...
...
yifu-archives/yifu-archives-biz/src/main/resources/logback-spring.xml
View file @
b40a2da0
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<configuration
debug=
"false"
scan=
"false"
>
<configuration
debug=
"false"
scan=
"false"
>
<springProperty
scop=
"context"
name=
"spring.application.name"
source=
"spring.application.name"
defaultValue=
""
/>
<springProperty
scop=
"context"
name=
"springAppName"
source=
"spring.application.name"
defaultValue=
""
/>
<property
name=
"log.path"
value=
"logs/${spring.application.name}"
/>
<springProperty
scop=
"context"
name=
"springAppActive"
source=
"spring.profiles.active"
defaultValue=
""
/>
<property
name=
"log.path"
value=
"logs/${springAppName}"
/>
<!-- 彩色日志格式 -->
<!-- 彩色日志格式 -->
<property
name=
"CONSOLE_LOG_PATTERN"
<property
name=
"CONSOLE_LOG_PATTERN"
value=
"${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"
/>
value=
"${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"
/>
...
@@ -18,6 +19,27 @@
...
@@ -18,6 +19,27 @@
<pattern>
${CONSOLE_LOG_PATTERN}
</pattern>
<pattern>
${CONSOLE_LOG_PATTERN}
</pattern>
</encoder>
</encoder>
</appender>
</appender>
<!--邮件提醒-->
<appender
name=
"MAIL"
class=
"ch.qos.logback.classic.net.SMTPAppender"
>
<smtpHost>
smtp.exmail.qq.com
</smtpHost>
<smtpPort>
465
</smtpPort>
<username>
information@wanxin-holdings.com
</username>
<password>
QmdCaQSPmCAQEddd
</password>
<SSL>
true
</SSL>
<asynchronousSending>
true
</asynchronousSending>
<to>
wangpeng@wanxin-holdings.com,chenyuxi@wanxin-holdings.com
</to>
<from>
information@wanxin-holdings.com
</from>
<subject>
hro-mvp ${springAppActive}环境 ${springAppName}服务: %-20msg 错误
</subject>
<charsetEncoding>
UTF-8
</charsetEncoding>
<cyclicBufferTracker
class=
"ch.qos.logback.core.spi.CyclicBufferTracker"
>
<!-- <!– 每个电子邮件只发送一个日志条目 –>-->
<bufferSize>
1
</bufferSize>
</cyclicBufferTracker>
<layout
class=
"ch.qos.logback.classic.html.HTMLLayout"
/>
<filter
class=
"ch.qos.logback.classic.filter.ThresholdFilter"
>
<level>
ERROR
</level>
</filter>
</appender>
<!-- Log file debug output -->
<!-- Log file debug output -->
<appender
name=
"debug"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
<appender
name=
"debug"
class=
"ch.qos.logback.core.rolling.RollingFileAppender"
>
...
@@ -48,12 +70,29 @@
...
@@ -48,12 +70,29 @@
</filter>
</filter>
</appender>
</appender>
<springProfile
name=
"prd"
>
<root
level=
"error"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<appender-ref
ref=
"MAIL"
/>
</root>
</springProfile>
<springProfile
name=
"dev"
>
<root
level=
"error"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<appender-ref
ref=
"MAIL"
/>
</root>
</springProfile>
<springProfile
name=
"test"
>
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<!-- Level: FATAL 0 ERROR 3 WARN 4 INFO 6 DEBUG 7 -->
<root
level=
"error"
>
<root
level=
"error"
>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"console"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"debug"
/>
<appender-ref
ref=
"error"
/>
<appender-ref
ref=
"error"
/>
</root>
</root>
</springProfile>
</configuration>
</configuration>
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