How can I configure Hibernate to use SSL to talk to the DB server?

前端 未结 4 891
Happy的楠姐
Happy的楠姐 2021-01-12 01:37

I have an existing java webapp that uses Hibernate for it\'s persistence. I\'ve been told that I have to have to talk to the DB encrypted - so my first thought is to set it

4条回答
  •  轮回少年
    2021-01-12 02:13

    Try this:

        org.hibernate.dialect.MySQLInnoDBDialect
        com.mysql.jdbc.Driver
        jdbc:mysql://blablaba:8443/dbname?useSSL=true
        false
        true
        true
        bablablab
        clclclclc
    

    related links

    http://www.razorsql.com/articles/mysql_ssl_jdbc.html

    http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-using-ssl.html

    http://www.javabeat.net/qna/164-hibernate-jdbc-and-connection-properties/

提交回复
热议问题