亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

這是為什么

2016-5-15 22:33:11 org.hibernate.Version logVersion

INFO: HHH000412: Hibernate Core {5.1.0.Final}

2016-5-15 22:33:11 org.hibernate.cfg.Environment <clinit>

INFO: HHH000206: hibernate.properties not found

2016-5-15 22:33:11 org.hibernate.cfg.Environment buildBytecodeProvider

INFO: HHH000021: Bytecode provider name : javassist

2016-5-15 22:33:11 org.hibernate.boot.jaxb.internal.stax.LocalXmlResourceResolver resolveEntity

WARN: HHH90000012: Recognized obsolete hibernate namespace http://hibernate.sourceforge.net/hibernate-configuration. Use namespace http://www.hibernate.org/dtd/hibernate-configuration instead. ?Support for obsolete DTD/XSD namespaces may be removed at any time.

2016-5-15 22:33:11 org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>

INFO: HCANN000001: Hibernate Commons Annotations {5.0.1.Final}

2016-5-15 22:33:11 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure

WARN: HHH10001002: Using Hibernate built-in connection pool (not for production use!)

2016-5-15 22:33:12 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator

INFO: HHH10001005: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/imooc?useUnicode=true&characterEncoding=utf8]

2016-5-15 22:33:12 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator

INFO: HHH10001001: Connection properties: {user=root, password=****}

2016-5-15 22:33:12 org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator

INFO: HHH10001003: Autocommit mode: false

2016-5-15 22:33:12 org.hibernate.engine.jdbc.connections.internal.PooledConnections <init>

INFO: HHH000115: Hibernate connection pool size: 20 (min=1)

Sun May 15 22:33:12 CST 2016 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

2016-5-15 22:33:12 org.hibernate.dialect.Dialect <init>

INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQLDialect

Exception in thread "main" java.lang.NullPointerException

at com.imooc.entity.Test.add(Test.java:21)

at com.imooc.entity.Test.main(Test.java:10)


正在回答

3 回答

Sun May 07 14:05:09 CST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.

0 回復 有任何疑惑可以回復我~

 現在的連接url:Connection connect = DriverManager.getConnection("jdbc:mysql://localhost:3306/test?useSSL=false","root", "letmein"); ? ? 不使用ssl協議即可 安全套接層

2 回復 有任何疑惑可以回復我~

我是hibernate5,不同版本存在細微差異,看一下說明文檔。ServiceRegistry serviceRegistry=new StandardServiceRegistryBuilder().applySettings(configuration.getProperties()).configure().build();

在老師用的4.2好像是ServiceRegistry serviceRegistry=new ServiceRegistryBuilder().applySettings(configuration.getProperties()).build();

沒有代碼我也分析不了

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消
Hibernate初探之一對多映射
  • 參與學習       42163    人
  • 解答問題       310    個

Hibernate中一對多關聯映射配置,以及cascade和inverse屬性作用

進入課程

這是為什么

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號