@Component public class DatasourceService extends Object
@Comment(value="\u6570\u636e\u6e90\u5217\u8868") public List<DatasourceVO> list() throws SQLException
根据资源配置类型(数据库或文件)分别处理: - 若为数据库资源,则查询指定表中路径匹配 '/sohelp-boot/datasource/' 的记录,并解析其内容构建数据源对象; - 若为文件资源,则通过文件服务接口加载该目录下的所有数据源配置文件。
SQLException - 当执行数据库查询时发生错误。@Comment(value="\u83b7\u53d6\u6570\u636e\u6e90") public DatasourceVO getDatasource(String key) throws Exception
key - 数据源的唯一标识符。Exception - 在流操作过程中可能抛出异常。Copyright © 2026. All rights reserved.