Task 4.1: 包名统一重构 - 重命名 41 个 Java 文件的包名 - 更新所有 import 语句 - 恢复枚举类(FaultCategory、DiagnosisStatus、SourceType) - 更新测试类的 import 重构范围: - domain/entity: 3 个实体类 - domain/model: 2 个数据类 - domain/enums: 3 个枚举类 - repository: 3 个接口 - service/session: 2 个类(接口 + 实现) - config: 9 个配置类 - controller: 2 个控制器 - agent/tool: 4 个工具类 - client: 1 个客户端 - Main.java: 主类 验证结果: - 编译成功,无错误 - 所有测试通过 (27/27) - ApiDocumentRepositoryTest: 7/7 ✅ - CaseLibraryRepositoryTest: 6/6 ✅ - DiagnosisRecordRepositoryTest: 6/6 ✅ - RedisSessionManagerTest: 8/8 ✅ Progress: 21/33 tasks completed (64%)
96 lines
1.9 KiB
Java
96 lines
1.9 KiB
Java
package com.superbiz.agent.config;
|
|
|
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
@Configuration
|
|
@ConfigurationProperties(prefix = "milvus")
|
|
public class MilvusProperties {
|
|
|
|
private String host = "localhost";
|
|
private Integer port = 19530;
|
|
private String username = "";
|
|
private String password = "";
|
|
private String database = "default";
|
|
private Long timeout = 10000L;
|
|
private String token = "";
|
|
private boolean secure = false;
|
|
private int vectorDim = 1024;
|
|
|
|
public String getHost() {
|
|
return host;
|
|
}
|
|
|
|
public void setHost(String host) {
|
|
this.host = host;
|
|
}
|
|
|
|
public Integer getPort() {
|
|
return port;
|
|
}
|
|
|
|
public void setPort(Integer port) {
|
|
this.port = port;
|
|
}
|
|
|
|
public String getUsername() {
|
|
return username;
|
|
}
|
|
|
|
public void setUsername(String username) {
|
|
this.username = username;
|
|
}
|
|
|
|
public String getPassword() {
|
|
return password;
|
|
}
|
|
|
|
public void setPassword(String password) {
|
|
this.password = password;
|
|
}
|
|
|
|
public String getDatabase() {
|
|
return database;
|
|
}
|
|
|
|
public void setDatabase(String database) {
|
|
this.database = database;
|
|
}
|
|
|
|
public Long getTimeout() {
|
|
return timeout;
|
|
}
|
|
|
|
public void setTimeout(Long timeout) {
|
|
this.timeout = timeout;
|
|
}
|
|
|
|
public String getToken() {
|
|
return token;
|
|
}
|
|
|
|
public void setToken(String token) {
|
|
this.token = token;
|
|
}
|
|
|
|
public boolean isSecure() {
|
|
return secure;
|
|
}
|
|
|
|
public void setSecure(boolean secure) {
|
|
this.secure = secure;
|
|
}
|
|
|
|
public int getVectorDim() {
|
|
return vectorDim;
|
|
}
|
|
|
|
public void setVectorDim(int vectorDim) {
|
|
this.vectorDim = vectorDim;
|
|
}
|
|
|
|
public String getAddress() {
|
|
return host + ":" + port;
|
|
}
|
|
}
|