Hibernate学习
来源:互联网 发布:软交换网络的结构 编辑:程序博客网 时间:2024/06/08 09:35
log4j配置
# For JBoss: Avoid to setup Log4J outside $JBOSS_HOME/server/default/deploy/log4j.xml!# For all other servers: Comment out the Log4J listener in web.xml to activate Log4J.log4j.rootLogger=INFO, stdout, logfile,DEBUGlog4j.appender.stdout=org.apache.log4j.ConsoleAppenderlog4j.appender.stdout.layout=org.apache.log4j.PatternLayoutlog4j.appender.stdout.layout.ConversionPattern=%d %p [%c]:%m%nlog4j.appender.logfile=org.apache.log4j.RollingFileAppenderlog4j.appender.logfile.layout=org.apache.log4j.PatternLayoutlog4j.appender.logfile.File=../interface/logfile.log# Keep three backup files.log4j.appender.logfile.MaxBackupIndex=10log4j.appender.logfile.MaxFileSize=5120KB# Pattern to output: date priority [category] - messagelog4j.appender.logfile.layout.ConversionPattern=%d %p [%c]:%m%n#log4j.logger.org.springframework.samples.petclinic.aspects=DEBUG#=========================================#= spring framewokr log configuration =#=========================================log4j.logger.org.springframework = INFO,DEBUGlog4j.logger.com.risetek.tsm.interfaces = INFOlog4j.appender.logfile.encoding=utf-8
Hibernate配置
<?xml version='1.0' encoding='utf-8'?><!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"><!-- Generated by MyEclipse Hibernate Tools. --><hibernate-configuration> <session-factory> <!-- PostgreSQL connection --> <property name="connection.url">jdbc:mysql://localhost:3306/testhibernate?useUnicode=true&characterEncoding=utf8</property> <property name="connection.username">root</property> <property name="connection.password"></property> <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <property name="dialect">org.hibernate.dialect.MySQL5Dialect</property> <!-- MySQL connection <property name="connection.url">jdbc:mysql://localhost/firsthibernate</property> <property name="connection.username">root</property> <property name="connection.driver_class">com.mysql.jdbc.Driver</property> <property name="dialect">org.hibernate.dialect.MySQLDialect</property> <property name="connection.password">r</property> --> <property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property> <!-- thread is the short name for org.hibernate.context.ThreadLocalSessionContext and let Hibernate bind the session automatically to the thread --> <property name="current_session_context_class">thread</property> <!-- this will show us all sql statements --> <property name="hibernate.show_sql">true</property> <!-- this will create the database tables for us --> <property name="hibernate.hbm2ddl.auto">update</property> </session-factory></hibernate-configuration>
0 0
- Hibernate学习:初识hibernate
- Hibernate学习:(Hibernate)cascade
- hibernate学习 hibernate概述
- 【hibernate】 深度学习hibernate
- 学习HIBERNATE
- Hibernate学习
- hibernate学习
- Hibernate学习
- hibernate学习:
- Hibernate学习
- hibernate学习
- Hibernate 学习
- Hibernate学习
- 学习Hibernate
- hibernate学习
- hibernate学习
- hibernate 学习
- Hibernate学习
- Hover 手机端的实现
- 主流流媒体服务器
- 佛光抚顶国发股份3广汇股份话大后方观后感后加工后加工何
- 【c语言】有3个数a,b,c,要求按大小顺序把它们输出
- Oracle分析函数参考手册
- Hibernate学习
- 第七周项目一之图形用户界面(GUI)应用程序开发初体验
- Xcode 升级后,常常遇到的遇到的警告、错误,解决方法
- java反射练习02
- 【c语言】求 1+2+3+4+...+100
- Daemon守护进程
- ios 应用中直接跳转到指定app页面 或者 app 评价页面 的方法
- maven正确的集成命令-U -B 等
- 数据库事务隔离级别