永发信息网

db.properties中passord是加密后的密码,知道解密规则如何JDBC连接数据库?

答案:1  悬赏:70  手机版
解决时间 2021-11-27 17:50
  • 提问者网友:斑駁影
  • 2021-11-27 12:58
db.properties中passord是加密后的密码,知道解密规则如何JDBC连接数据库?
最佳答案
  • 五星知识达人网友:荒野風
  • 2021-11-27 13:40
读取该配置中的属性  带入解密算法呗
 Properties prop = null;
     InputStream is = null;

     try {
       prop = new Properties();
       is = SpfsComTool.class.getResourceAsStream("/conf/main-setting.properties" );
       prop.load(is);

     } catch (IOException e) {

     throw new BaseException( "properties file:setting.properties convert to InputStrem error", e);
        } finally {

            if ( null != is) {
                try {
                    is.close();
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
        }
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯