fix: 明确 Skill Git 访问策略注入构造器
- 标记生产构造器供 Spring 容器稳定选择 - 补充组件实例化回归测试
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package tech.easyflow.skill.gitimport;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
import tech.easyflow.common.web.exceptions.BusinessException;
|
||||
|
||||
@@ -28,10 +29,17 @@ public class GitRepositoryAccessPolicy {
|
||||
*
|
||||
* @param properties Git 导入配置
|
||||
*/
|
||||
@Autowired
|
||||
public GitRepositoryAccessPolicy(SkillGitImportProperties properties) {
|
||||
this(properties, InetAddress::getAllByName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建可替换主机解析器的 Git 地址访问策略。
|
||||
*
|
||||
* @param properties Git 导入配置
|
||||
* @param hostResolver 主机解析器
|
||||
*/
|
||||
GitRepositoryAccessPolicy(SkillGitImportProperties properties, HostResolver hostResolver) {
|
||||
this.properties = properties;
|
||||
this.hostResolver = hostResolver;
|
||||
|
||||
Reference in New Issue
Block a user