feat: 添加AOP支持和更新链接控制器逻辑

主要修改:
1. 在pom.xml中新增spring-boot-starter-aop依赖,支持面向切面编程。
2. 在LinkController中移除DeviceCodeMappingService的依赖,更新二维码获取逻辑,使用linkStatusService获取设备ID。
3. 在SelectRegionResponse中新增mecmachineId字段,便于调试和维护。
4. 在SecurityConfig中允许二维码HEAD请求公开访问。

技术细节:
- 通过引入AOP支持,提升了代码的可维护性和扩展性,同时优化了链接控制器的逻辑,确保设备ID的获取更加灵活。
This commit is contained in:
zyh
2025-08-28 22:19:06 +08:00
parent a56eebc30b
commit 1d72bc4c5a
12 changed files with 526 additions and 352 deletions

View File

@@ -29,7 +29,12 @@ public class SelectRegionResponse {
@Schema(description = "二维码出现延迟时间(秒)", example = "5")
private Integer qrDelaySeconds;
@Schema(description = "MEC 机器ID", example = "f1")
private String mecmachineId;
public SelectRegionResponse() {}
public SelectRegionResponse(boolean success, String message) {
@@ -100,7 +105,13 @@ public class SelectRegionResponse {
public void setQrDelaySeconds(Integer qrDelaySeconds) {
this.qrDelaySeconds = qrDelaySeconds;
}
public String getMecmachineId() {
return mecmachineId;
}
public void setMecmachineId(String mecmachineId) {
this.mecmachineId = mecmachineId;
}
@Override
public String toString() {
return "SelectRegionResponse{" +
@@ -112,6 +123,7 @@ public class SelectRegionResponse {
", status='" + status + '\'' +
", region='" + region + '\'' +
", qrDelaySeconds=" + qrDelaySeconds +
", mecmachineId='" + mecmachineId + '\'' +
'}';
}
}