mysql – spring jpa application.properties useSSL
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了mysql – spring jpa application.properties useSSL,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1645字,纯文字阅读大概需要3分钟。
内容图文
我试图关闭ssl,到我的本地mysql数据库.
但我无法在spring的application.properties文件中找到实际属性.
我当前的文件是:
# ===============================
# = DATA SOURCE
# ===============================
# Set here configurations for the database connection
# Connection url for the database "test"
spring.datasource.url = jdbc:mysql://localhost:3306/test
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
# Username and password
spring.datasource.username = root
spring.datasource.password = blah
# Keep the connection alive if idle for a long time (needed in production)
spring.datasource.testWhileIdle = true
spring.datasource.validationQuery = SELECT 1
# ===============================
# = JPA / HIBERNATE
# ===============================
# Use spring.jpa.properties.* for Hibernate native properties (the prefix is
# stripped before adding them to the entity manager).
# Show or not log for each sql query
spring.jpa.show-sql = true
# Hibernate ddl auto (create, create-drop, update): with "update" the database
# schema will be automatically updated accordingly to java entities found in
# the project
spring.jpa.hibernate.ddl-auto = update
# Naming strategy
spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy
# Allows Hibernate to generate SQL optimized for a particular DBMS
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
我试过spring.datasource.useSSl = false,但这不起作用.我也试过spring.datasource.url = jdbc:mysql:// localhost:3306 / test& useSSL = false
解决方法:
我用下面修正了我的问题:
jdbc:mysql://localhost:3306/test?verifyServerCertificate=false&useSSL=false&requireSSL=false
内容总结
以上是互联网集市为您收集整理的mysql – spring jpa application.properties useSSL全部内容,希望文章能够帮你解决mysql – spring jpa application.properties useSSL所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。