重构项目模块结构,更新pom.xml文件,统一模块命名为简洁形式,移除冗余依赖,优化依赖管理。新增子模块支持,提升项目可维护性和可扩展性。

This commit is contained in:
2025-08-22 17:29:00 +08:00
parent 890c60bcb3
commit 300daf0af5
55 changed files with 1410 additions and 1164 deletions
+83
View File
@@ -0,0 +1,83 @@
你是一个专业的 iOS SwiftUI 开发助手,任务是基于 Figma 原型图自动生成 SwiftUI 页面代码,要求如下:
[参数]
- Figma 页面名称: 登录界面
- Swift 页面名称: LoginView
[开发规范]
1. **目录结构**
-`Views/LoginView/` 下创建:
- `LoginView.swift`SwiftUI 页面)
- `LoginViewModel.swift`(如有业务逻辑)
- 所有通用组件(DesignSystem、Scale、FigmaRenderer、FigmaLoader)放在 `Shared/` 文件夹,仅创建一次,后续页面共用。
2. **UI 渲染要求**
- 使用 MCP (Talk-To-Figma) 获取 Figma 节点 JSON 数据并渲染 UI。
- 遵循 Figma 布局顺序(背景 → 图片 → 文本 → 按钮)。
- 必须自适配所有 iPhone 屏幕,使用 `GeometryReader` + 缩放工具。
- 字体、颜色、圆角、阴影、间距等严格跟随 Figma。
- 所有图片用 `Image("ResourceName")`,并加 `.resizable().aspectRatio(contentMode: .fit)`
3. **命名规则**
- Swift 文件、类名、结构体名:`PascalCase`,如 `LoginView`
- 所有图片/图标文件名:`PascalCase`(每个单词首字母大写,不允许 `_``-`)。
- 资源文件夹路径:
```
Assets.xcassets/LoginView{{ImageName}}.imageset/{{ImageName}}.svg
```
例如:
```
Assets.xcassets/LoginViewInitialHero.imageset/InitialHero.svg
```
4. **静态资源处理(SVG 专用)**
- 所有图片/图标资源来自 Figma,格式为 SVG。
- 每个 `.imageset` 文件夹包含:
- `ImageName.svg`
- `Contents.json` 内容如下:
```json
{
"images": [
{
"filename": "ImageName.svg",
"idiom": "universal"
}
],
"info": {
"version": 1,
"author": "xcode"
},
"properties": {
"preserves-vector-representation": true,
"template-rendering-intent": "original"
}
}
```
- 不需要 `@1x/@2x/@3x`,只保留一份 SVG。
- 如果资源缺失,在代码中加 `// TODO: 补充 ImageName.svg 到 Assets.xcassets/LoginView{{ImageName}}.imageset/`。
- 输出末尾列出所有缺失图片清单,格式:
```
[资源清单]
- ImageName.svg → Assets.xcassets/LoginView{{ImageName}}.imageset/ImageName.svg
```
5. **代码生成要求**
- 使用 SwiftUI,代码必须可运行。
- 如果页面已有旧代码,执行**重构**,保持代码整洁。
- 每个 Swift 文件顶部添加注释,说明页面来源(Figma 页面名称)和生成时间。
6. **图片命名优化**
- 所有 Figma 元素名(如 `btn_login`, `icon-home`)自动转换为 PascalCase`BtnLogin``IconHome`)。
- 代码中的 `Image("BtnLogin")` 必须与资源文件夹一致。
7. **最终输出**
- 生成 `LoginView.swift`(完整 SwiftUI 页面实现)。
- 列出缺失的 SVG 资源清单。
- 自动创建 `.imageset` 路径和 `Contents.json` 模板。
- 确保比例缩放和 UI 细节与 Figma 一致。
[任务]
根据以上规范,将 Figma 页面 **登录界面** 转换为 SwiftUI 页面 **LoginView**,并输出:
- 完整的 `LoginView.swift` 代码
- 缺失的 SVG 资源清单
- `.imageset` 文件夹和 `Contents.json` 模板示例
+25
View File
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.emotionmuseum</groupId>
<artifactId>admin</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>admin-api</artifactId>
<name>admin-api</name>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
+18
View File
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.emotionmuseum</groupId>
<artifactId>backend</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>admin</artifactId>
<packaging>pom</packaging>
<modules>
<module>api</module>
<module>server</module>
</modules>
</project>
+38
View File
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.emotionmuseum</groupId>
<artifactId>admin</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>admin-server</artifactId>
<name>admin</name>
<dependencies>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
</plugin>
</plugins>
</build>
</project>
+25
View File
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.emotionmuseum</groupId>
<artifactId>ai</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>ai-api</artifactId>
<name>ai-api</name>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,14 @@
package com.emotionmuseum.ai.api.client;
import com.emotionmuseum.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
@FeignClient(name = "ai")
public interface AiClient {
@GetMapping("/api/ai/chat/health")
Result<Boolean> health();
}
+7 -101
View File
@@ -3,110 +3,16 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>com.emotionmuseum</groupId> <groupId>com.emotionmuseum</groupId>
<artifactId>backend</artifactId> <artifactId>backend</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent> </parent>
<artifactId>ai</artifactId>
<artifactId>emotion-ai</artifactId> <packaging>pom</packaging>
<name>emotion-ai</name> <modules>
<description>AI对话服务</description> <module>api</module>
<module>server</module>
<dependencies> </modules>
<!-- 内部模块依赖 -->
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>emotion-common</artifactId>
</dependency>
<!-- Spring Cloud Discovery -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- Spring Boot DevTools for automatic restart -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<!-- Spring Boot Web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- OpenFeign -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<!-- MySQL -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- Druid -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
</dependency>
<!-- 暂时移除Spring AI,使用原生HTTP客户端实现 -->
<!-- HTTP客户端 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<!-- 监控 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- 监控指标 -->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<configuration>
<mainClass>com.emotionmuseum.ai.AiApplication</mainClass>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project> </project>
+65
View File
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.emotionmuseum</groupId>
<artifactId>ai</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>ai-server</artifactId>
<name>ai</name>
<description>AI对话服务</description>
<dependencies>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>ai-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
</dependencies>
</project>
@@ -4,7 +4,12 @@ import com.emotionmuseum.ai.request.*;
import com.emotionmuseum.ai.response.*; import com.emotionmuseum.ai.response.*;
import com.emotionmuseum.ai.service.AiChatService; import com.emotionmuseum.ai.service.AiChatService;
import com.emotionmuseum.ai.service.ConversationDbService; import com.emotionmuseum.ai.service.ConversationDbService;
import com.emotionmuseum.ai.entity.Conversation;
import com.emotionmuseum.ai.entity.Message;
import com.emotionmuseum.ai.dto.ChatRequest;
import com.emotionmuseum.ai.dto.ChatResponse;
import com.emotionmuseum.common.response.BasePageResponse; import com.emotionmuseum.common.response.BasePageResponse;
import com.emotionmuseum.common.dto.PageQuery;
import com.emotionmuseum.common.result.Result; import com.emotionmuseum.common.result.Result;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
@@ -15,6 +20,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import jakarta.validation.Valid; import jakarta.validation.Valid;
import java.util.List;
/** /**
* AI聊天控制器 * AI聊天控制器
@@ -35,32 +41,34 @@ public class AiChatController {
@Operation(summary = "创建会话") @Operation(summary = "创建会话")
@PostMapping("/conversation/create") @PostMapping("/conversation/create")
public Result<CreateConversationResponse> createConversation( public Result<com.emotionmuseum.ai.dto.CreateConversationResponse> createConversation(
@Valid @RequestBody CreateConversationRequest request) { @Valid @RequestBody com.emotionmuseum.ai.dto.CreateConversationRequest request) {
log.info("收到创建会话请求: userId={}, title={}", request.getUserId(), request.getTitle()); log.info("收到创建会话请求: userId={}, title={}", request.getUserId(), request.getTitle());
CreateConversationResponse response = aiChatService.createConversation(request); com.emotionmuseum.ai.dto.CreateConversationResponse response = aiChatService.createConversation(request);
return Result.success(response); return Result.success(response);
} }
@Operation(summary = "发送聊天消息") @Operation(summary = "发送聊天消息")
@PostMapping("/send") @PostMapping("/send")
public Result<AiChatResponse> sendMessage(@Valid @RequestBody AiChatRequest request) { public Result<com.emotionmuseum.ai.dto.ChatResponse> sendMessage(
@Valid @RequestBody com.emotionmuseum.ai.dto.ChatRequest request) {
log.info("收到聊天请求: userId={}, message={}", request.getUserId(), request.getMessage()); log.info("收到聊天请求: userId={}, message={}", request.getUserId(), request.getMessage());
AiChatResponse response = aiChatService.chat(request); com.emotionmuseum.ai.dto.ChatResponse response = aiChatService.chat(request);
return Result.success(response); return Result.success(response);
} }
@Operation(summary = "情绪分析") @Operation(summary = "情绪分析")
@PostMapping("/emotion/analyze") @PostMapping("/emotion/analyze")
public Result<EmotionAnalysisResponse> analyzeEmotion(@Valid @RequestBody EmotionAnalysisRequest request) { public Result<com.emotionmuseum.ai.dto.EmotionAnalysisResponse> analyzeEmotion(
@Valid @RequestBody com.emotionmuseum.ai.dto.EmotionAnalysisRequest request) {
log.info("收到情绪分析请求: userId={}, text={}", request.getUserId(), request.getText()); log.info("收到情绪分析请求: userId={}, text={}", request.getUserId(), request.getText());
EmotionAnalysisResponse response = aiChatService.analyzeEmotion(request); com.emotionmuseum.ai.dto.EmotionAnalysisResponse response = aiChatService.analyzeEmotion(request);
return Result.success(response); return Result.success(response);
} }
@Operation(summary = "流式聊天") @Operation(summary = "流式聊天")
@PostMapping("/stream") @PostMapping("/stream")
public Result<String> streamChat(@Valid @RequestBody AiChatRequest request) { public Result<String> streamChat(@Valid @RequestBody com.emotionmuseum.ai.dto.ChatRequest request) {
log.info("收到流式聊天请求: userId={}", request.getUserId()); log.info("收到流式聊天请求: userId={}", request.getUserId());
String response = aiChatService.streamChat(request); String response = aiChatService.streamChat(request);
return Result.success(response); return Result.success(response);
@@ -181,10 +189,11 @@ public class AiChatController {
"这是第三段回复,介绍了情感分析功能。我可以分析你的情绪状态并提供建议。"; "这是第三段回复,介绍了情感分析功能。我可以分析你的情绪状态并提供建议。";
// 创建或获取会话 // 创建或获取会话
CreateConversationRequest convRequest = new CreateConversationRequest(); com.emotionmuseum.ai.dto.CreateConversationRequest convRequest = new com.emotionmuseum.ai.dto.CreateConversationRequest();
convRequest.setUserId(request.getUserId()); convRequest.setUserId(request.getUserId());
convRequest.setTitle("测试拆分消息"); convRequest.setTitle("测试拆分消息");
CreateConversationResponse conversation = aiChatService.createConversation(convRequest); com.emotionmuseum.ai.dto.CreateConversationResponse conversation = aiChatService
.createConversation(convRequest);
// 保存用户消息 // 保存用户消息
Message userMessage = new Message(); Message userMessage = new Message();
@@ -2,6 +2,8 @@ package com.emotionmuseum.ai.controller;
import com.emotionmuseum.ai.request.*; import com.emotionmuseum.ai.request.*;
import com.emotionmuseum.ai.response.*; import com.emotionmuseum.ai.response.*;
import com.emotionmuseum.ai.dto.MessageListResponse;
import com.emotionmuseum.ai.dto.GuestUserInfo;
import com.emotionmuseum.ai.service.GuestChatService; import com.emotionmuseum.ai.service.GuestChatService;
import com.emotionmuseum.common.result.Result; import com.emotionmuseum.common.result.Result;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
@@ -33,7 +35,8 @@ public class GuestChatController {
@PostMapping("/chat") @PostMapping("/chat")
@Operation(summary = "访客聊天", description = "访客模式下发送消息并获取AI回复") @Operation(summary = "访客聊天", description = "访客模式下发送消息并获取AI回复")
public Result<GuestChatResponse> guestChat(@RequestBody GuestChatRequest request) { public Result<com.emotionmuseum.ai.dto.GuestChatResponse> guestChat(
@RequestBody com.emotionmuseum.ai.dto.GuestChatRequest request) {
// 自动获取客户端IP和User-Agent // 自动获取客户端IP和User-Agent
String clientIp = getClientIp(); String clientIp = getClientIp();
@@ -56,7 +59,7 @@ public class GuestChatController {
String clientIp = getClientIp(); String clientIp = getClientIp();
log.info("获取访客会话列表: IP={}", clientIp); log.info("获取访客会话列表: IP={}", clientIp);
return guestChatService.getGuestConversations(clientIp, pageNum, pageSize); return (Result) guestChatService.getGuestConversations(clientIp, pageNum, pageSize);
} }
@GetMapping("/conversation/{conversationId}/messages") @GetMapping("/conversation/{conversationId}/messages")
@@ -96,8 +99,8 @@ public class GuestChatController {
@PostMapping("/emotion/analyze") @PostMapping("/emotion/analyze")
@Operation(summary = "访客情绪分析", description = "分析访客输入文本的情绪") @Operation(summary = "访客情绪分析", description = "分析访客输入文本的情绪")
public Result<EmotionAnalysisResponse> analyzeGuestEmotion( public Result<com.emotionmuseum.ai.dto.EmotionAnalysisResponse> analyzeGuestEmotion(
@RequestBody EmotionAnalysisRequest request) { @RequestBody com.emotionmuseum.ai.dto.EmotionAnalysisRequest request) {
String clientIp = getClientIp(); String clientIp = getClientIp();
log.info("访客情绪分析: IP={}, Text={}", clientIp, request.getText()); log.info("访客情绪分析: IP={}, Text={}", clientIp, request.getText());
@@ -113,7 +116,8 @@ public class GuestChatController {
@PostMapping("/test/split") @PostMapping("/test/split")
@Operation(summary = "测试消息拆分功能", description = "测试AI回复消息的拆分功能") @Operation(summary = "测试消息拆分功能", description = "测试AI回复消息的拆分功能")
public Result<GuestChatResponse> testMessageSplit(@RequestBody GuestChatRequest request) { public Result<com.emotionmuseum.ai.dto.GuestChatResponse> testMessageSplit(
@RequestBody com.emotionmuseum.ai.dto.GuestChatRequest request) {
log.info("测试消息拆分功能: message={}", request.getMessage()); log.info("测试消息拆分功能: message={}", request.getMessage());
// 模拟包含不同换行符的AI回复进行测试 // 模拟包含不同换行符的AI回复进行测试
@@ -132,7 +136,7 @@ public class GuestChatController {
} }
// 创建模拟的访客聊天响应 // 创建模拟的访客聊天响应
GuestChatResponse response = new GuestChatResponse(); com.emotionmuseum.ai.dto.GuestChatResponse response = new com.emotionmuseum.ai.dto.GuestChatResponse();
response.setGuestUserId("test_guest_user"); response.setGuestUserId("test_guest_user");
response.setGuestNickname("测试用户"); response.setGuestNickname("测试用户");
response.setConversationId("test_conversation_" + System.currentTimeMillis()); response.setConversationId("test_conversation_" + System.currentTimeMillis());
+25
View File
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.emotionmuseum</groupId>
<artifactId>auth</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>auth-api</artifactId>
<name>auth-api</name>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,14 @@
package com.emotionmuseum.auth.api.client;
import com.emotionmuseum.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
@FeignClient(name = "auth")
public interface AuthClient {
@GetMapping("/auth/health")
Result<Boolean> health();
}
+6 -132
View File
@@ -3,142 +3,16 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>com.emotionmuseum</groupId> <groupId>com.emotionmuseum</groupId>
<artifactId>backend</artifactId> <artifactId>backend</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<artifactId>auth</artifactId>
<artifactId>emotion-auth</artifactId> <packaging>pom</packaging>
<name>emotion-auth</name> <modules>
<description>情感博物馆认证授权服务</description> <module>api</module>
<module>server</module>
<dependencies> </modules>
<!-- 公共模块 -->
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>emotion-common</artifactId>
<version>1.0.0</version>
</dependency>
<!-- Spring Boot Web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- Spring Security -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<!-- Spring Data JPA -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!-- Spring Data Redis -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!-- MySQL驱动 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<!-- MyBatis Plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<!-- JWT -->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
</dependency>
<!-- 第三方登录 -->
<dependency>
<groupId>me.zhyd.oauth</groupId>
<artifactId>JustAuth</artifactId>
<version>1.16.5</version>
</dependency>
<!-- 验证码 -->
<dependency>
<groupId>com.github.whvcse</groupId>
<artifactId>easy-captcha</artifactId>
<version>1.6.2</version>
</dependency>
<!-- Nacos服务发现 -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<!-- Nacos配置中心 -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- 监控 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- 测试 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<configuration>
<mainClass>com.emotionmuseum.auth.AuthApplication</mainClass>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project> </project>
+145
View File
@@ -0,0 +1,145 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.emotionmuseum</groupId>
<artifactId>auth</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>auth-server</artifactId>
<name>auth</name>
<description>情感博物馆认证授权服务</description>
<dependencies>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>auth-api</artifactId>
<version>${project.version}</version>
</dependency>
<!-- 公共模块 -->
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Spring Boot Web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- Spring Security -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<!-- Spring Data JPA -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!-- Spring Data Redis -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!-- MySQL驱动 -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<!-- MyBatis Plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<!-- JWT -->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
</dependency>
<!-- 第三方登录 -->
<dependency>
<groupId>me.zhyd.oauth</groupId>
<artifactId>JustAuth</artifactId>
<version>1.16.5</version>
</dependency>
<!-- 验证码 -->
<dependency>
<groupId>com.github.whvcse</groupId>
<artifactId>easy-captcha</artifactId>
<version>1.6.2</version>
</dependency>
<!-- Nacos服务发现/配置中心 -->
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- 监控 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- 测试 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<configuration>
<mainClass>com.emotionmuseum.auth.AuthApplication</mainClass>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
@@ -39,39 +39,4 @@ public class LoginResponse extends BaseResponse {
@Schema(description = "登录时间") @Schema(description = "登录时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime loginTime; private LocalDateTime loginTime;
/**
* 用户信息响应
*/
@Data
@Schema(description = "用户信息响应")
public static class UserInfoResponse {
@Schema(description = "用户ID")
private String userId;
@Schema(description = "账号")
private String account;
@Schema(description = "用户名")
private String username;
@Schema(description = "昵称")
private String nickname;
@Schema(description = "邮箱")
private String email;
@Schema(description = "手机号")
private String phone;
@Schema(description = "头像URL")
private String avatar;
@Schema(description = "用户状态")
private String status;
@Schema(description = "最后登录时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime lastLoginTime;
}
} }
@@ -1,9 +1,9 @@
package com.emotionmuseum.auth.service; package com.emotionmuseum.auth.service;
import com.emotionmuseum.auth.dto.LoginRequest; import com.emotionmuseum.auth.request.LoginRequest;
import com.emotionmuseum.auth.dto.RegisterRequest; import com.emotionmuseum.auth.request.RegisterRequest;
import com.emotionmuseum.auth.vo.LoginResponse; import com.emotionmuseum.auth.response.LoginResponse;
import com.emotionmuseum.auth.vo.UserInfoResponse; import com.emotionmuseum.auth.response.UserInfoResponse;
/** /**
* 认证服务接口 * 认证服务接口
@@ -1,6 +1,6 @@
package com.emotionmuseum.auth.service; package com.emotionmuseum.auth.service;
import com.emotionmuseum.auth.dto.CaptchaResponse; import com.emotionmuseum.auth.response.CaptchaResponse;
/** /**
* 验证码服务接口 * 验证码服务接口
@@ -1,7 +1,7 @@
package com.emotionmuseum.auth.service; package com.emotionmuseum.auth.service;
import com.emotionmuseum.auth.dto.SliderCaptchaResponse; import com.emotionmuseum.auth.response.SliderCaptchaResponse;
import com.emotionmuseum.auth.dto.SliderCaptchaVerifyRequest; import com.emotionmuseum.auth.request.SliderCaptchaVerifyRequest;
/** /**
* 滑块验证码服务接口 * 滑块验证码服务接口
@@ -4,14 +4,14 @@ import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.emotionmuseum.common.result.ResultCode; import com.emotionmuseum.common.result.ResultCode;
import com.emotionmuseum.common.util.JwtUtil; import com.emotionmuseum.common.util.JwtUtil;
import com.emotionmuseum.auth.dto.LoginRequest; import com.emotionmuseum.auth.request.LoginRequest;
import com.emotionmuseum.auth.dto.RegisterRequest; import com.emotionmuseum.auth.request.RegisterRequest;
import com.emotionmuseum.auth.entity.User; import com.emotionmuseum.auth.entity.User;
import com.emotionmuseum.auth.mapper.UserMapper; import com.emotionmuseum.auth.mapper.UserMapper;
import com.emotionmuseum.auth.service.AuthService; import com.emotionmuseum.auth.service.AuthService;
import com.emotionmuseum.auth.service.CaptchaService; import com.emotionmuseum.auth.service.CaptchaService;
import com.emotionmuseum.auth.vo.LoginResponse; import com.emotionmuseum.auth.response.LoginResponse;
import com.emotionmuseum.auth.vo.UserInfoResponse; import com.emotionmuseum.auth.response.UserInfoResponse;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
@@ -2,9 +2,9 @@ package com.emotionmuseum.auth.service.impl;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.emotionmuseum.auth.dto.CaptchaResponse; import com.emotionmuseum.auth.response.CaptchaResponse;
import com.emotionmuseum.auth.dto.SliderCaptchaResponse; import com.emotionmuseum.auth.response.SliderCaptchaResponse;
import com.emotionmuseum.auth.dto.SliderCaptchaVerifyRequest; import com.emotionmuseum.auth.request.SliderCaptchaVerifyRequest;
import com.emotionmuseum.auth.service.CaptchaService; import com.emotionmuseum.auth.service.CaptchaService;
import com.emotionmuseum.auth.service.SliderCaptchaService; import com.emotionmuseum.auth.service.SliderCaptchaService;
import com.wf.captcha.base.Captcha; import com.wf.captcha.base.Captcha;
@@ -2,8 +2,8 @@ package com.emotionmuseum.auth.service.impl;
import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.IdUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.emotionmuseum.auth.dto.SliderCaptchaResponse; import com.emotionmuseum.auth.response.SliderCaptchaResponse;
import com.emotionmuseum.auth.dto.SliderCaptchaVerifyRequest; import com.emotionmuseum.auth.request.SliderCaptchaVerifyRequest;
import com.emotionmuseum.auth.service.SliderCaptchaService; import com.emotionmuseum.auth.service.SliderCaptchaService;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
+2 -2
View File
@@ -11,8 +11,8 @@
<version>1.0.0</version> <version>1.0.0</version>
</parent> </parent>
<artifactId>emotion-common</artifactId> <artifactId>common</artifactId>
<name>emotion-common</name> <name>common</name>
<description>公共模块</description> <description>公共模块</description>
<dependencies> <dependencies>
@@ -73,8 +73,8 @@ public class BasePageResponse<T> extends BaseResponse {
this.total = page.getTotal(); this.total = page.getTotal();
this.pages = page.getPages(); this.pages = page.getPages();
this.records = page.getRecords(); this.records = page.getRecords();
this.hasNext = page.hasNext(); this.hasNext = this.current != null && this.pages != null && this.current < this.pages;
this.hasPrevious = page.hasPrevious(); this.hasPrevious = this.current != null && this.current > 1;
} }
/** /**
+25
View File
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.emotionmuseum</groupId>
<artifactId>explore</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>explore-api</artifactId>
<name>explore-api</name>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,14 @@
package com.emotionmuseum.explore.api.client;
import com.emotionmuseum.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
@FeignClient(name = "explore")
public interface ExploreClient {
@GetMapping("/explore/health")
Result<Boolean> health();
}
+9 -110
View File
@@ -1,119 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>com.emotionmuseum</groupId> <groupId>com.emotionmuseum</groupId>
<artifactId>backend</artifactId> <artifactId>backend</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent> </parent>
<artifactId>explore</artifactId>
<artifactId>emotion-explore</artifactId> <packaging>pom</packaging>
<name>emotion-explore</name> <modules>
<description>地图探索服务</description> <module>api</module>
<module>server</module>
<dependencies> </modules>
<!-- 内部模块依赖 -->
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>emotion-common</artifactId>
</dependency>
<!-- Spring Cloud Discovery -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- Spring Boot DevTools for automatic restart -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<!-- Spring Boot Web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- Spring Boot Validation -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!-- MyBatis Plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<!-- MySQL -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- Druid -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
</dependency>
<!-- Redis -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!-- Lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<!-- 工具类 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
</dependency>
<!-- 监控 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- API文档 -->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>
+65
View File
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.emotionmuseum</groupId>
<artifactId>explore</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>explore-server</artifactId>
<name>explore</name>
<description>地图探索服务</description>
<dependencies>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>explore-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
</project>
+3 -3
View File
@@ -11,15 +11,15 @@
<version>1.0.0</version> <version>1.0.0</version>
</parent> </parent>
<artifactId>emotion-gateway</artifactId> <artifactId>gateway</artifactId>
<name>emotion-gateway</name> <name>gateway</name>
<description>API网关服务</description> <description>API网关服务</description>
<dependencies> <dependencies>
<!-- 公共模块(排除Web依赖,网关使用Reactive --> <!-- 公共模块(排除Web依赖,网关使用Reactive -->
<dependency> <dependency>
<groupId>com.emotionmuseum</groupId> <groupId>com.emotionmuseum</groupId>
<artifactId>emotion-common</artifactId> <artifactId>common</artifactId>
<exclusions> <exclusions>
<exclusion> <exclusion>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
+25
View File
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.emotionmuseum</groupId>
<artifactId>growth</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>growth-api</artifactId>
<name>growth-api</name>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,14 @@
package com.emotionmuseum.growth.api.client;
import com.emotionmuseum.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
@FeignClient(name = "growth")
public interface GrowthClient {
@GetMapping("/growth/health")
Result<Boolean> health();
}
+9 -110
View File
@@ -1,119 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>com.emotionmuseum</groupId> <groupId>com.emotionmuseum</groupId>
<artifactId>backend</artifactId> <artifactId>backend</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent> </parent>
<artifactId>growth</artifactId>
<artifactId>emotion-growth</artifactId> <packaging>pom</packaging>
<name>emotion-growth</name> <modules>
<description>成长课题服务</description> <module>api</module>
<module>server</module>
<dependencies> </modules>
<!-- 内部模块依赖 -->
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>emotion-common</artifactId>
</dependency>
<!-- Spring Cloud Discovery -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- Spring Boot DevTools for automatic restart -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<!-- Spring Boot Web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- Spring Boot Validation -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!-- MyBatis Plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<!-- MySQL -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- Druid -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
</dependency>
<!-- Redis -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!-- Lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<!-- 工具类 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
</dependency>
<!-- 监控 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- API文档 -->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>
+65
View File
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.emotionmuseum</groupId>
<artifactId>growth</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>growth-server</artifactId>
<name>growth</name>
<description>成长课题服务</description>
<dependencies>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>growth-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
</project>
+13 -12
View File
@@ -13,17 +13,18 @@
<!-- 子模块 --> <!-- 子模块 -->
<modules> <modules>
<module>emotion-common</module> <module>common</module>
<module>emotion-auth</module> <module>gateway</module>
<module>emotion-gateway</module> <module>auth</module>
<module>emotion-user</module> <module>user</module>
<module>emotion-ai</module> <module>ai</module>
<module>emotion-websocket</module> <module>websocket</module>
<module>emotion-record</module> <module>record</module>
<module>emotion-growth</module> <module>growth</module>
<module>emotion-explore</module> <module>explore</module>
<module>emotion-reward</module> <module>reward</module>
<module>emotion-stats</module> <module>stats</module>
<module>admin</module>
</modules> </modules>
<!-- 版本属性 --> <!-- 版本属性 -->
@@ -197,7 +198,7 @@
<!-- 内部模块 --> <!-- 内部模块 -->
<dependency> <dependency>
<groupId>com.emotionmuseum</groupId> <groupId>com.emotionmuseum</groupId>
<artifactId>emotion-common</artifactId> <artifactId>common</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
</dependencies> </dependencies>
+25
View File
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.emotionmuseum</groupId>
<artifactId>record</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>record-api</artifactId>
<name>record-api</name>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,14 @@
package com.emotionmuseum.record.api.client;
import com.emotionmuseum.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
@FeignClient(name = "record")
public interface RecordClient {
@GetMapping("/record/health")
Result<Boolean> health();
}
+9 -110
View File
@@ -1,119 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>com.emotionmuseum</groupId> <groupId>com.emotionmuseum</groupId>
<artifactId>backend</artifactId> <artifactId>backend</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent> </parent>
<artifactId>record</artifactId>
<artifactId>emotion-record</artifactId> <packaging>pom</packaging>
<name>emotion-record</name> <modules>
<description>情绪记录服务</description> <module>api</module>
<module>server</module>
<dependencies> </modules>
<!-- 内部模块依赖 -->
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>emotion-common</artifactId>
</dependency>
<!-- Spring Cloud Discovery -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- Spring Boot DevTools for automatic restart -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<!-- Spring Boot Web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- Spring Boot Validation -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!-- MyBatis Plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<!-- MySQL -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- Druid -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
</dependency>
<!-- Redis -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!-- Lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<!-- 工具类 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
</dependency>
<!-- 监控 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- API文档 -->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>
+65
View File
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.emotionmuseum</groupId>
<artifactId>record</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>record-server</artifactId>
<name>record</name>
<description>情绪记录服务</description>
<dependencies>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>record-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
</project>
+25
View File
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.emotionmuseum</groupId>
<artifactId>reward</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>reward-api</artifactId>
<name>reward-api</name>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,14 @@
package com.emotionmuseum.reward.api.client;
import com.emotionmuseum.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
@FeignClient(name = "reward")
public interface RewardClient {
@GetMapping("/reward/health")
Result<Boolean> health();
}
+9 -110
View File
@@ -1,119 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>com.emotionmuseum</groupId> <groupId>com.emotionmuseum</groupId>
<artifactId>backend</artifactId> <artifactId>backend</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent> </parent>
<artifactId>reward</artifactId>
<artifactId>emotion-reward</artifactId> <packaging>pom</packaging>
<name>emotion-reward</name> <modules>
<description>奖励系统服务</description> <module>api</module>
<module>server</module>
<dependencies> </modules>
<!-- 内部模块依赖 -->
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>emotion-common</artifactId>
</dependency>
<!-- Spring Cloud Discovery -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- Spring Boot DevTools for automatic restart -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<!-- Spring Boot Web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- Spring Boot Validation -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!-- MyBatis Plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<!-- MySQL -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- Druid -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
</dependency>
<!-- Redis -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!-- Lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<!-- 工具类 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
</dependency>
<!-- 监控 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- API文档 -->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>
+65
View File
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.emotionmuseum</groupId>
<artifactId>reward</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>reward-server</artifactId>
<name>reward</name>
<description>奖励系统服务</description>
<dependencies>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>reward-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
</project>
+25
View File
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.emotionmuseum</groupId>
<artifactId>stats</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>stats-api</artifactId>
<name>stats-api</name>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,14 @@
package com.emotionmuseum.stats.api.client;
import com.emotionmuseum.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
@FeignClient(name = "stats")
public interface StatsClient {
@GetMapping("/stats/health")
Result<Boolean> health();
}
+9 -110
View File
@@ -1,119 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>com.emotionmuseum</groupId> <groupId>com.emotionmuseum</groupId>
<artifactId>backend</artifactId> <artifactId>backend</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent> </parent>
<artifactId>stats</artifactId>
<artifactId>emotion-stats</artifactId> <packaging>pom</packaging>
<name>emotion-stats</name> <modules>
<description>统计分析服务</description> <module>api</module>
<module>server</module>
<dependencies> </modules>
<!-- 内部模块依赖 -->
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>emotion-common</artifactId>
</dependency>
<!-- Spring Cloud Discovery -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- Spring Boot DevTools for automatic restart -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<!-- Spring Boot Web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- Spring Boot Validation -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!-- MyBatis Plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<!-- MySQL -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- Druid -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
</dependency>
<!-- Redis -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!-- Lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<!-- 工具类 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
</dependency>
<!-- 监控 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- API文档 -->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project> </project>
+65
View File
@@ -0,0 +1,65 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.emotionmuseum</groupId>
<artifactId>stats</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>stats-server</artifactId>
<name>stats</name>
<description>统计分析服务</description>
<dependencies>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>stats-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
</project>
+25
View File
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.emotionmuseum</groupId>
<artifactId>user</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>user-api</artifactId>
<name>user-api</name>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,18 @@
package com.emotionmuseum.user.api.client;
import com.emotionmuseum.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
@FeignClient(name = "user")
public interface UserClient {
@GetMapping("/user/health")
Result<Boolean> health();
@GetMapping("/user/info/{userId}")
Result<?> getUserInfo(@PathVariable("userId") String userId);
}
+7 -154
View File
@@ -3,163 +3,16 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>com.emotionmuseum</groupId> <groupId>com.emotionmuseum</groupId>
<artifactId>backend</artifactId> <artifactId>backend</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent> </parent>
<artifactId>user</artifactId>
<artifactId>emotion-user</artifactId> <packaging>pom</packaging>
<name>emotion-user</name> <modules>
<description>用户服务</description> <module>api</module>
<module>server</module>
<dependencies> </modules>
<!-- 内部模块依赖 -->
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>emotion-common</artifactId>
</dependency>
<!-- Spring Cloud Discovery -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- Spring Boot DevTools for automatic restart -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<!-- Spring Boot Web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- Spring Boot Validation -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!-- MyBatis Plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<!-- MySQL -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- Druid -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
</dependency>
<!-- Redis -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!-- Spring Security -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<!-- JWT -->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
</dependency>
<!-- 第三方登录 -->
<dependency>
<groupId>me.zhyd.oauth</groupId>
<artifactId>JustAuth</artifactId>
<version>1.16.5</version>
</dependency>
<!-- 验证码 -->
<dependency>
<groupId>com.github.whvcse</groupId>
<artifactId>easy-captcha</artifactId>
<version>1.6.2</version>
</dependency>
<!-- Lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<!-- 工具类 -->
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
</dependency>
<!-- 监控 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- API文档 -->
<dependency>
<groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi3-spring-boot-starter</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<configuration>
<mainClass>com.emotionmuseum.user.UserApplication</mainClass>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project> </project>
+131
View File
@@ -0,0 +1,131 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.emotionmuseum</groupId>
<artifactId>user</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>user-server</artifactId>
<name>user</name>
<description>用户服务</description>
<dependencies>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>user-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- Spring Security -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<!-- JWT -->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
</dependency>
<!-- 第三方登录 -->
<dependency>
<groupId>me.zhyd.oauth</groupId>
<artifactId>JustAuth</artifactId>
<version>1.16.5</version>
</dependency>
<!-- 验证码 -->
<dependency>
<groupId>com.github.whvcse</groupId>
<artifactId>easy-captcha</artifactId>
<version>1.6.2</version>
</dependency>
<!-- 测试 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<configuration>
<mainClass>com.emotionmuseum.user.UserApplication</mainClass>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
@@ -1,9 +1,9 @@
package com.emotionmuseum.user.service; package com.emotionmuseum.user.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import com.emotionmuseum.user.dto.UserUpdateRequest; import com.emotionmuseum.user.request.UserUpdateRequest;
import com.emotionmuseum.user.entity.User; import com.emotionmuseum.user.entity.User;
import com.emotionmuseum.user.vo.UserInfoResponse; import com.emotionmuseum.user.response.UserInfoResponse;
/** /**
* 用户服务接口 * 用户服务接口
@@ -1,11 +1,11 @@
package com.emotionmuseum.user.service.impl; package com.emotionmuseum.user.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.emotionmuseum.user.dto.UserUpdateRequest; import com.emotionmuseum.user.request.UserUpdateRequest;
import com.emotionmuseum.user.entity.User; import com.emotionmuseum.user.entity.User;
import com.emotionmuseum.user.mapper.UserMapper; import com.emotionmuseum.user.mapper.UserMapper;
import com.emotionmuseum.user.service.UserService; import com.emotionmuseum.user.service.UserService;
import com.emotionmuseum.user.vo.UserInfoResponse; import com.emotionmuseum.user.response.UserInfoResponse;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
+25
View File
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.emotionmuseum</groupId>
<artifactId>websocket</artifactId>
<version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>websocket-api</artifactId>
<name>websocket-api</name>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>
@@ -0,0 +1,14 @@
package com.emotionmuseum.websocket.api.client;
import com.emotionmuseum.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
@FeignClient(name = "websocket")
public interface WebsocketClient {
@GetMapping("/websocket/health")
Result<Boolean> health();
}
+7 -130
View File
@@ -3,139 +3,16 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<parent> <parent>
<groupId>com.emotionmuseum</groupId> <groupId>com.emotionmuseum</groupId>
<artifactId>backend</artifactId> <artifactId>backend</artifactId>
<version>1.0.0</version> <version>1.0.0</version>
<relativePath>../pom.xml</relativePath>
</parent> </parent>
<artifactId>websocket</artifactId>
<artifactId>emotion-websocket</artifactId> <packaging>pom</packaging>
<name>emotion-websocket</name> <modules>
<description>WebSocket聊天服务</description> <module>api</module>
<module>server</module>
<dependencies> </modules>
<!-- 内部模块依赖 -->
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>emotion-common</artifactId>
</dependency>
<!-- Spring Cloud Discovery -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<!-- Spring Boot DevTools for automatic restart -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<!-- Spring Boot Web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- WebSocket -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<!-- Validation -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!-- OpenFeign -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<!-- Load Balancer -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
</dependency>
<!-- MySQL -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- Druid -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
</dependency>
<!-- MyBatis Plus -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
</dependency>
<!-- Redis -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<!-- 监控 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<!-- 监控指标 -->
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
<!-- 测试数据库 -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<configuration>
<mainClass>com.emotionmuseum.websocket.WebsocketApplication</mainClass>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project> </project>
+77
View File
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.emotionmuseum</groupId>
<artifactId>websocket</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>websocket-server</artifactId>
<name>websocket</name>
<description>WebSocket聊天服务</description>
<dependencies>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>websocket-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.emotionmuseum</groupId>
<artifactId>common</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-loadbalancer</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-redis</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
</dependencies>
</project>