Skip to content
This repository was archived by the owner on Dec 4, 2025. It is now read-only.

Commit b8afb7d

Browse files
authored
Merge pull request #811 from shalousun/master
release: 3.0.5.
2 parents 3ed7a6c + 8f1185e commit b8afb7d

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

pom.xml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<artifactId>smart-doc</artifactId>
77
<packaging>jar</packaging>
8-
<version>3.0.4</version>
8+
<version>3.0.5</version>
99

1010
<name>smart-doc</name>
1111
<url>https://github.com/TongchengOpenSource/smart-doc.git</url>
@@ -128,6 +128,17 @@
128128
<id>release</id>
129129
<build>
130130
<plugins>
131+
<plugin>
132+
<groupId>org.sonatype.plugins</groupId>
133+
<artifactId>nexus-staging-maven-plugin</artifactId>
134+
<version>1.6.13</version>
135+
<extensions>true</extensions>
136+
<configuration>
137+
<serverId>oss01</serverId>
138+
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
139+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
140+
</configuration>
141+
</plugin>
131142
<plugin>
132143
<groupId>org.apache.maven.plugins</groupId>
133144
<artifactId>maven-gpg-plugin</artifactId>

src/main/java/com/ly/doc/constants/SpringMvcAnnotations.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ public interface SpringMvcAnnotations {
6161

6262
String REST_CONTROLLER_ADVICE = "RestControllerAdvice";
6363

64+
String CONTROLLER_ADVICE = "ControllerAdvice";
65+
6466
String EXCEPTION_HANDLER = "ExceptionHandler";
6567

6668
String RESPONSE_STATUS = "ResponseStatus";

src/main/java/com/ly/doc/template/SpringBootDocBuildTemplate.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,9 +195,14 @@ public FrameworkAnnotations registeredAnnotations() {
195195
// Add Exception advice
196196
Map<String, ExceptionAdviceAnnotation> exceptionAdviceAnnotations = new HashMap<>(16);
197197

198-
ExceptionAdviceAnnotation exceptionAdviceAnnotation = ExceptionAdviceAnnotation.builder()
198+
ExceptionAdviceAnnotation controllerAdviceAnnotation = ExceptionAdviceAnnotation.builder()
199+
.setAnnotationName(SpringMvcAnnotations.CONTROLLER_ADVICE);
200+
exceptionAdviceAnnotations.put(controllerAdviceAnnotation.getAnnotationName(), controllerAdviceAnnotation);
201+
202+
ExceptionAdviceAnnotation restControllerAdviceAnnotation = ExceptionAdviceAnnotation.builder()
199203
.setAnnotationName(SpringMvcAnnotations.REST_CONTROLLER_ADVICE);
200-
exceptionAdviceAnnotations.put(exceptionAdviceAnnotation.getAnnotationName(), exceptionAdviceAnnotation);
204+
exceptionAdviceAnnotations.put(restControllerAdviceAnnotation.getAnnotationName(), restControllerAdviceAnnotation);
205+
201206
annotations.setExceptionAdviceAnnotations(exceptionAdviceAnnotations);
202207

203208
return annotations;

0 commit comments

Comments
 (0)