#jdbc
jdbc.driverClassName=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://127.0.0.1:3306/databaseName
jdbc.username=root
jdbc.password=root
# Hibernate configuration
hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.query.substitutions=true 'T', false 'F';
hibernate.hbm2ddl.auto=update
hibernate.c3p0.minPoolSize=1
hibernate.c3p0.maxPoolSize=20
hibernate.c3p0.timeout=600
hibernate.c3p0.max_statement=50
hibernate.c3p0.testConnectionOnCheckout=false;
hibernate.show_sql=true
hibernate.connection.useUnicode=true
hibernate.connection.characterEncoding=UTF-8
本文详细介绍了如何在Java应用程序中使用Hibernate ORM框架与MySQL数据库进行连接,包括配置JDBC驱动、设置数据库URL、用户名、密码,以及Hibernate的配置参数如方言、查询替换、连接池大小、超时时间等。
537

被折叠的 条评论
为什么被折叠?



