为什么要加密呢,安全?可以限制下载啊

解决方案 »

  1.   

    因为对安全特殊要求,密码不让直接写在配置文件里,所以才想通过加密和解密的过程来处理。请大家指点。限制下载?好像不能满足要求,还有好的意见吗?
      

  2.   

    那就不要使用它的配置文件,你可以在hibernate.cfg.xml中定义<property name="hibernate.connection.provider_class">chdw.RepositoryConnectionProvider</property>
    你自己实现这个写一个实现了ConnectionProvider的RepositoryConnectionProvider就可以又或者Configuration cfg = new Configuration().configure();
    cfg.getProperties().setProperty("hibernate.connection.password", "mypassword");
      

  3.   

    哦,好的,非常感谢,高手,赞一个,呵呵。结贴给分。