public class SohelpBootResourceFileServiceImpl extends Object implements ISohelpBootResourceService
| 构造器和说明 |
|---|
SohelpBootResourceFileServiceImpl() |
| 限定符和类型 | 方法和说明 |
|---|---|
Map<String,Object> |
add(String path,
String content)
添加配置资源
|
void |
deleteBatch(String path)
批量删除配置
|
void |
deleteByPath(String path)
根据路径删除配置资源
|
boolean |
exists(String path)
判断资源是否存在
|
com.alibaba.fastjson.JSONObject |
getByPath(String path)
根据文件名获取文件内容
|
<T> T |
getByPath(String path,
Class<T> cls)
根据路径获取对象
|
String |
getResourcePath(String path) |
List<com.alibaba.fastjson.JSONObject> |
listByPath(String path)
根据指定路径读取配置资源列表
|
<T> List<T> |
listByPath(String filePath,
Class<T> cls)
根据文件路径读取配置资源列表,并将JSON对象转换为指定类型的对象列表
|
List<com.alibaba.fastjson.JSONObject> |
listByRegex(String filePath,
String regex)
根据正则表达式筛选出符合条件的JSON对象列表
|
<T> List<T> |
listByRegex(String filePath,
String regex,
Class<T> cls)
根据正则表达式从指定文件路径中列出符合条件的对象列表
|
void |
renamePath(String srcFilePath,
String newFilePath)
重命名路径
|
Map<String,Object> |
save(String path,
Map<String,Object> formMap)
保存配置资源
|
Map<String,Object> |
save(String path,
String context)
保存配置资源
|
Map<String,Object> |
updateByPath(String path,
String content)
更新配置资源
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitconvertClass, formatFilePath, readOnly@Comment(value="\u6839\u636e\u6587\u4ef6\u540d\u83b7\u53d6\u6587\u4ef6\u5185\u5bb9") public com.alibaba.fastjson.JSONObject getByPath(String path)
getByPath 在接口中 ISohelpBootResourceServicepath - BusiException@Comment(value="\u6839\u636e\u8def\u5f84\u83b7\u53d6\u5bf9\u8c61") public <T> T getByPath(String path, Class<T> cls) throws SQLException
getByPath 在接口中 ISohelpBootResourceServiceT - path - cls - SQLException - SQL异常@Comment(value="\u4fdd\u5b58\u914d\u7f6e\u8d44\u6e90") public Map<String,Object> save(String path, Map<String,Object> formMap) throws SQLException, BusiException
save 在接口中 ISohelpBootResourceServicepath - formMap - SQLExceptionBusiException - 业务异常@Comment(value="\u5224\u65ad\u8d44\u6e90\u662f\u5426\u5b58\u5728") public boolean exists(String path)
exists 在接口中 ISohelpBootResourceServicepath - 资源路径@Comment(value="\u4fdd\u5b58\u914d\u7f6e\u8d44\u6e90") public Map<String,Object> save(String path, String context) throws SQLException, BusiException
ISohelpBootResourceServicesave 在接口中 ISohelpBootResourceServicepath - context - SQLExceptionBusiException - 业务异常@Comment(value="\u521b\u5efa\u914d\u7f6e\u8d44\u6e90") public Map<String,Object> add(String path, String content) throws SQLException, BusiException
ISohelpBootResourceServiceadd 在接口中 ISohelpBootResourceServicepath - content - SQLExceptionBusiException - 业务异常@Comment(value="\u91cd\u547d\u540d\u8def\u5f84") public void renamePath(String srcFilePath, String newFilePath) throws SQLException, BusiException
renamePath 在接口中 ISohelpBootResourceServicesrcFilePath - 源文件路径newFilePath - 新文件路径SQLException - 如果数据库操作失败,则抛出此异常BusiException - 如果业务逻辑异常,则抛出此异常@Comment(value="\u66f4\u65b0\u6587\u4ef6\u5185\u5bb9") public Map<String,Object> updateByPath(String path, String content) throws SQLException, BusiException
ISohelpBootResourceServiceupdateByPath 在接口中 ISohelpBootResourceServicepath - 配置资源文件的路径content - 配置资源的JSON字符串SQLException - SQL异常BusiException - 业务异常@Comment(value="\u6839\u636e\u6307\u5b9a\u8def\u5f84\u8bfb\u53d6\u914d\u7f6e\u8d44\u6e90\u5217\u8868") public List<com.alibaba.fastjson.JSONObject> listByPath(String path)
listByPath 在接口中 ISohelpBootResourceServicepath - 配置资源的路径Exception - 当读取配置资源时发生异常@Comment(value="\u8bfb\u53d6\u914d\u7f6e\u8d44\u6e90\u5217\u8868") public <T> List<T> listByPath(String filePath, Class<T> cls) throws SQLException
listByPath 在接口中 ISohelpBootResourceServiceT - 目标类型filePath - 文件路径cls - 目标类型SQLException - SQL异常public List<com.alibaba.fastjson.JSONObject> listByRegex(String filePath, String regex) throws SQLException
listByRegex 在接口中 ISohelpBootResourceServicefilePath - 文件路径regex - 正则表达式SQLException - 当查询数据库时发生异常public <T> List<T> listByRegex(String filePath, String regex, Class<T> cls) throws SQLException
listByRegex 在接口中 ISohelpBootResourceServiceT - 返回对象的类型filePath - 文件路径regex - 正则表达式cls - 返回对象的类类型SQLException - 如果在执行过程中发生SQL异常,则抛出此异常@Comment(value="\u5220\u9664\u914d\u7f6e\u8d44\u6e90") public void deleteByPath(String path) throws BusiException
deleteByPath 在接口中 ISohelpBootResourceServicepath - 配置资源的路径BusiException - 如果删除过程中出现异常,抛出BusiException异常@Comment(value="\u6279\u91cf\u5220\u9664\u914d\u7f6e") public void deleteBatch(String path) throws BusiException
deleteBatch 在接口中 ISohelpBootResourceServicepath - 配置路径BusiException - 如果删除失败则抛出异常Copyright © 2025. All rights reserved.