Przeglądaj źródła

整理swagger配置

xsx 1 rok temu
rodzic
commit
1c98ccf3f9

+ 2 - 2
im-client/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>box-im</artifactId>
         <groupId>com.bx</groupId>
-        <version>2.0.0</version>
+        <version>3.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -15,7 +15,7 @@
         <dependency>
             <groupId>com.bx</groupId>
             <artifactId>im-commom</artifactId>
-            <version>2.0.0</version>
+            <version>3.0.0</version>
         </dependency>
     </dependencies>
 </project>

+ 2 - 7
im-commom/pom.xml

@@ -5,16 +5,11 @@
     <parent>
         <artifactId>box-im</artifactId>
         <groupId>com.bx</groupId>
-        <version>2.0.0</version>
+        <version>3.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <artifactId>im-commom</artifactId>
-
-    <properties>
-        <maven.compiler.source>8</maven.compiler.source>
-        <maven.compiler.target>8</maven.compiler.target>
-    </properties>
-
+    <packaging>jar</packaging>
     <dependencies>
         <dependency>
             <groupId>org.projectlombok</groupId>

+ 2 - 11
im-platform/pom.xml

@@ -5,18 +5,16 @@
     <parent>
         <artifactId>box-im</artifactId>
         <groupId>com.bx</groupId>
-        <version>2.0.0</version>
+        <version>3.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
-
     <artifactId>im-platform</artifactId>
 
-
     <dependencies>
         <dependency>
             <groupId>com.bx</groupId>
             <artifactId>im-client</artifactId>
-            <version>2.0.0</version>
+            <version>3.0.0</version>
         </dependency>
         <dependency>
             <groupId>org.springframework.boot</groupId>
@@ -53,11 +51,6 @@
             <groupId>org.aspectj</groupId>
             <artifactId>aspectjweaver</artifactId>
         </dependency>
-        <!-- 引入redis -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-data-redis</artifactId>
-        </dependency>
         <dependency>
             <groupId>org.springframework.security</groupId>
             <artifactId>spring-security-crypto</artifactId>
@@ -99,14 +92,12 @@
             <version>${knife4j.version}</version>
         </dependency>
     </dependencies>
-
     <build>
         <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
-                <version>3.3.1</version>
                 <executions>
                     <execution>
                         <goals>

+ 4 - 7
im-platform/src/main/java/com/bx/implatform/config/MvcConfig.java

@@ -19,13 +19,10 @@ public class MvcConfig implements WebMvcConfigurer {
 
     @Override
     public void addInterceptors(InterceptorRegistry registry) {
-        registry.addInterceptor(xssInterceptor)
-                .addPathPatterns("/**")
-                .excludePathPatterns("/error");
-        registry.addInterceptor(authInterceptor)
-                .addPathPatterns("/**")
-                .excludePathPatterns("/login", "/logout", "/register", "/refreshToken",
-                        "/swagger-resources/**", "/webjars/**", "/v2/**", "/swagger-ui.html/**");
+        registry.addInterceptor(xssInterceptor).addPathPatterns("/**").excludePathPatterns("/error");
+        registry.addInterceptor(authInterceptor).addPathPatterns("/**")
+            .excludePathPatterns("/login", "/logout", "/register", "/refreshToken", "/swagger/**", "/v3/api-docs/**",
+                "/swagger-resources/**", "/swagger-ui.html", "/swagger-ui/**", "/doc.html");
     }
 
     @Bean

+ 3 - 3
im-platform/src/main/java/com/bx/implatform/config/SwaggerConfig.java

@@ -16,7 +16,7 @@ public class SwaggerConfig {
     public GroupedOpenApi userApi() {
         String[] paths = {"/**"};
         String[] packagedToMatch = {"com.bx"};
-        return GroupedOpenApi.builder().group("BoxIM")
+        return GroupedOpenApi.builder().group("IM-Platform")
             .pathsToMatch(paths)
             .packagesToScan(packagedToMatch).build();
     }
@@ -26,8 +26,8 @@ public class SwaggerConfig {
         Contact contact = new Contact();
         contact.setName("Blue");
         return new OpenAPI().info(new Info()
-            .title("Box-IM")
-            .description("盒子IM")
+            .title("盒子IM")
+            .description("盒子IM业务平台服务")
             .contact(contact)
             .version("3.0")
             .termsOfService("https://www.boxim.online")

+ 1 - 1
im-platform/src/main/java/com/bx/implatform/controller/LoginController.java

@@ -13,7 +13,7 @@ import jakarta.validation.Valid;
 import lombok.RequiredArgsConstructor;
 import org.springframework.web.bind.annotation.*;
 
-@Tag(name = "用户登录和注册")
+@Tag(name = "注册登陆")
 @RestController
 @RequiredArgsConstructor
 public class LoginController {

+ 1 - 1
im-platform/src/main/java/com/bx/implatform/controller/UserController.java

@@ -18,7 +18,7 @@ import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
 
-@Tag(name = "用户")
+@Tag(name = "用户相关")
 @RestController
 @RequestMapping("/user")
 @RequiredArgsConstructor

+ 1 - 1
im-platform/src/main/java/com/bx/implatform/controller/WebrtcGroupController.java

@@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.*;
  * @date: 2024-06-01
  * @version: 1.0
  */
-@Tag(name = "webrtc视频多人通话")
+@Tag(name = "多人通话")
 @RestController
 @RequestMapping("/webrtc/group")
 @RequiredArgsConstructor

+ 1 - 1
im-platform/src/main/java/com/bx/implatform/controller/WebrtcPrivateController.java

@@ -9,7 +9,7 @@ import io.swagger.v3.oas.annotations.tags.Tag;
 import lombok.RequiredArgsConstructor;
 import org.springframework.web.bind.annotation.*;
 
-@Tag(name = "webrtc视频单人通话")
+@Tag(name = "单人通话")
 @RestController
 @RequestMapping("/webrtc/private")
 @RequiredArgsConstructor

+ 1 - 1
im-platform/src/main/java/com/bx/implatform/interceptor/AuthInterceptor.java

@@ -37,7 +37,7 @@ public class AuthInterceptor implements HandlerInterceptor {
         }
         String strJson = JwtUtil.getInfo(token);
         UserSession userSession = JSON.parseObject(strJson, UserSession.class);
-        //验证 token
+        // 验证 token
         if (!JwtUtil.checkSign(token, jwtProperties.getAccessTokenSecret())) {
             log.error("token已失效,用户:{}", userSession.getUserName());
             log.error("token:{}", token);

BIN
im-platform/src/main/resources/static/favicon.ico


+ 2 - 9
im-server/pom.xml

@@ -5,7 +5,7 @@
     <parent>
         <artifactId>box-im</artifactId>
         <groupId>com.bx</groupId>
-        <version>2.0.0</version>
+        <version>3.0.0</version>
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
@@ -16,27 +16,20 @@
         <dependency>
             <groupId>com.bx</groupId>
             <artifactId>im-commom</artifactId>
-            <version>2.0.0</version>
+            <version>3.0.0</version>
         </dependency>
         <dependency>
             <groupId>io.netty</groupId>
             <artifactId>netty-all</artifactId>
             <version>4.1.42.Final</version>
         </dependency>
-        <!-- 引入redis -->
-        <dependency>
-            <groupId>org.springframework.boot</groupId>
-            <artifactId>spring-boot-starter-data-redis</artifactId>
-        </dependency>
     </dependencies>
-
     <build>
         <finalName>${project.artifactId}</finalName>
         <plugins>
             <plugin>
                 <groupId>org.springframework.boot</groupId>
                 <artifactId>spring-boot-maven-plugin</artifactId>
-                <version>3.3.1</version>
                 <executions>
                     <execution>
                         <goals>

+ 3 - 32
pom.xml

@@ -7,7 +7,7 @@
     <artifactId>box-im</artifactId>
     <groupId>com.bx</groupId>
     <packaging>pom</packaging>
-    <version>2.0.0</version>
+    <version>3.0.0</version>
     <parent>
         <groupId>org.springframework.boot</groupId>
         <artifactId>spring-boot-starter-parent</artifactId>
@@ -70,37 +70,6 @@
                 <artifactId>hutool-all</artifactId>
                 <version>${hutool.version}</version>
             </dependency>
-            <dependency>
-                <groupId>org.apache.poi</groupId>
-                <artifactId>poi-ooxml</artifactId>
-                <version>4.1.2</version>
-            </dependency>
-            <dependency>
-                <groupId>commons-io</groupId>
-                <artifactId>commons-io</artifactId>
-                <version>2.6</version>
-            </dependency>
-            <dependency>
-                <groupId>dom4j</groupId>
-                <artifactId>dom4j</artifactId>
-                <version>1.6.1</version>
-            </dependency>
-            <dependency>
-                <groupId>org.codehaus.jackson</groupId>
-                <artifactId>jackson-mapper-asl</artifactId>
-                <version>1.9.13</version>
-            </dependency>
-            <dependency>
-                <groupId>javax.interceptor</groupId>
-                <artifactId>javax.interceptor-api</artifactId>
-                <version>1.2</version>
-            </dependency>
-            <dependency>
-                <groupId>org.springframework.security</groupId>
-                <artifactId>spring-security-jwt</artifactId>
-                <version>1.0.10.RELEASE</version>
-            </dependency>
-
         </dependencies>
 
     </dependencyManagement>
@@ -116,4 +85,6 @@
             </snapshots>
         </repository>
     </repositories>
+
+
 </project>