惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
SegmentFault 最新的问题
Spread Privacy
Spread Privacy
Google DeepMind News
Google DeepMind News
WordPress大学
WordPress大学
Blog — PlanetScale
Blog — PlanetScale
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Apple Machine Learning Research
Apple Machine Learning Research
SecWiki News
SecWiki News
腾讯CDC
P
Privacy International News Feed
Webroot Blog
Webroot Blog
J
Java Code Geeks
爱范儿
爱范儿
A
About on SuperTechFans
S
Secure Thoughts
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
D
DataBreaches.Net
Cloudbric
Cloudbric
Security Archives - TechRepublic
Security Archives - TechRepublic
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
C
Cyber Attacks, Cyber Crime and Cyber Security
P
Proofpoint News Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Security Latest
Security Latest
Forbes - Security
Forbes - Security
小众软件
小众软件
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cybersecurity and Infrastructure Security Agency CISA
T
Threatpost
量子位
MongoDB | Blog
MongoDB | Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
月光博客
月光博客
W
WeLiveSecurity
P
Privacy & Cybersecurity Law Blog
Vercel News
Vercel News
Google Online Security Blog
Google Online Security Blog
云风的 BLOG
云风的 BLOG
GbyAI
GbyAI
S
Security @ Cisco Blogs
T
The Exploit Database - CXSecurity.com
Help Net Security
Help Net Security
V
Visual Studio Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
Application and Cybersecurity Blog
Application and Cybersecurity Blog
博客园 - 聂微东
P
Proofpoint News Feed
C
CERT Recently Published Vulnerability Notes
Attack and Defense Labs
Attack and Defense Labs

博客园 - eafy.ye

Java获取系统信息(cpu,内存,硬盘,进程等)的相关方法 url参数中传递中文 - eafy.ye - 博客园 cglib介绍(转) openfire消息包接受处理流程&Openfire Plugins加载流程 eclipse中开发openfire 垃圾收集器与Java编程(转) Struts2的工作机制及分析(转) Freemarker caching of BeanWrapper models java传递是引用的拷贝,既不是引用本身,更不是对象 open session and Hibernate事务处理机制 Hibernate/JPA中的继承映射 奥运会开幕 Acegi集成CAS jBPM-jPDL学习笔记——流程设计与控制(转) JMock来实现孤立测试(转) jBPM开发入门指南 JAVA动态代理实现&&动态字节码生成(asm) java与Groovy的整合 Dom4j 使用简介
hibernate annotations和hbm.xml配置文件在spring中的并存配置
eafy.ye · 2008-07-31 · via 博客园 - eafy.ye

因为整合了不同的系统,一套系统使用的是hibernate annotation,另一套系统使用的是hbm.xml

偷懒不想重构,又不想修改太多,所以决定整合hibernate annotations和hbm.xml

  • <bean id="sessionFactory"  
  •         class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">   
  •         <property name="dataSource" ref="dataSource" />   
  •         <property name="mappingResources">   
  •             <list>   
  •                 <value>cn/com/iolog/model/User.hbm.xml</value>  
  •                 <value>...</value>  
  •             </list>   
  •         </property>   
  •            
  •         <property name="annotatedClasses">   
  •             <list>   
  •                 <value>com.iolog.newcentury.model.user.User</value>   
  •                 <value>...</value>  
  •             </list>   
  •         </property>   
  •          .......
  •   </bean>
  • <property name="mappingResources">指定映射文件
    <property name="annotatedClasses">指定annotation