Skip to content

Commit

Permalink
Merge pull request #811 from shalousun/master
Browse files Browse the repository at this point in the history
release: 3.0.5.
  • Loading branch information
shalousun committed Jun 9, 2024
2 parents 3ed7a6c + 8f1185e commit b8afb7d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
13 changes: 12 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>smart-doc</artifactId>
<packaging>jar</packaging>
<version>3.0.4</version>
<version>3.0.5</version>

<name>smart-doc</name>
<url>https://github.com/TongchengOpenSource/smart-doc.git</url>
Expand Down Expand Up @@ -128,6 +128,17 @@
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>oss01</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/ly/doc/constants/SpringMvcAnnotations.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public interface SpringMvcAnnotations {

String REST_CONTROLLER_ADVICE = "RestControllerAdvice";

String CONTROLLER_ADVICE = "ControllerAdvice";

String EXCEPTION_HANDLER = "ExceptionHandler";

String RESPONSE_STATUS = "ResponseStatus";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,14 @@ public FrameworkAnnotations registeredAnnotations() {
// Add Exception advice
Map<String, ExceptionAdviceAnnotation> exceptionAdviceAnnotations = new HashMap<>(16);

ExceptionAdviceAnnotation exceptionAdviceAnnotation = ExceptionAdviceAnnotation.builder()
ExceptionAdviceAnnotation controllerAdviceAnnotation = ExceptionAdviceAnnotation.builder()
.setAnnotationName(SpringMvcAnnotations.CONTROLLER_ADVICE);
exceptionAdviceAnnotations.put(controllerAdviceAnnotation.getAnnotationName(), controllerAdviceAnnotation);

ExceptionAdviceAnnotation restControllerAdviceAnnotation = ExceptionAdviceAnnotation.builder()
.setAnnotationName(SpringMvcAnnotations.REST_CONTROLLER_ADVICE);
exceptionAdviceAnnotations.put(exceptionAdviceAnnotation.getAnnotationName(), exceptionAdviceAnnotation);
exceptionAdviceAnnotations.put(restControllerAdviceAnnotation.getAnnotationName(), restControllerAdviceAnnotation);

annotations.setExceptionAdviceAnnotations(exceptionAdviceAnnotations);

return annotations;
Expand Down

0 comments on commit b8afb7d

Please sign in to comment.