aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pom.xml22
-rw-r--r--src/main/java/com/juick/config/SecurityConfig.java1
-rw-r--r--src/main/resources/application.properties1
3 files changed, 24 insertions, 0 deletions
diff --git a/pom.xml b/pom.xml
index b46c0b77..2c828b45 100644
--- a/pom.xml
+++ b/pom.xml
@@ -357,7 +357,16 @@
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>start</goal>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
<configuration>
+ <jvmArguments>-Dspring.application.admin.enabled=true</jvmArguments>
<excludes>
<exclude>
<groupId>com.google.code.findbugs</groupId>
@@ -366,6 +375,19 @@
</excludes>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.springdoc</groupId>
+ <artifactId>springdoc-openapi-maven-plugin</artifactId>
+ <version>1.4</version>
+ <executions>
+ <execution>
+ <id>integration-test</id>
+ <goals>
+ <goal>generate</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
<profiles>
diff --git a/src/main/java/com/juick/config/SecurityConfig.java b/src/main/java/com/juick/config/SecurityConfig.java
index 34e0a84d..255b0c5d 100644
--- a/src/main/java/com/juick/config/SecurityConfig.java
+++ b/src/main/java/com/juick/config/SecurityConfig.java
@@ -197,6 +197,7 @@ public class SecurityConfig {
.authorizeHttpRequests(requests -> requests
.requestMatchers(HttpMethod.OPTIONS).permitAll()
.requestMatchers("/api/", "/api/messages", "/api/avatar",
+ "/api/swagger-ui/**",
"/api/messages/discussions",
"/api/users", "/api/thread", "/api/tags",
"/api/tlgmbtwbhk", "/api/fbwbhk",
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index 594c53ac..7a7ddce0 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -10,3 +10,4 @@ spring.sql.init.platform=h2
spring.cache.type=simple
spring.cache.cache-names=help, usernames, users_by_name, discover, discussions, messages, replies, popular_tags, profiles
spring.profiles.active=@activatedProperties@
+springdoc.swagger-ui.path=/api/swagger-ui.html