Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: 3.0.5. #811

Merged
merged 1 commit into from
Jun 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading