In Oracle databases, varchar2 (4000), a large amount of content, is often helpless. In this regard, we often use large objects for storage (clob), but because the jdbc driver does not support CLOB well, it is often very troublesome to use hibernate for operations. However, with the latest oracle driver, ojdbc14.jar
Then, slightly change the attributes of SessionFactory in Spring:
<Bean id = "sessionFactory"
Class = "org. springframework. orm. hibernate3.annotation. AnnotationSessionFactoryBean">
<Property name = "dataSource">
<Ref bean = "dataSource"/>
</Property>
<Property name = "hibernateProperties">
<Props>
<Prop key = "hibernate. dialect">
Org. hibernate. dialect. Oracle9Dialect
</Prop>
<Prop key = "hibernate. connection. SetBigStringTryClob"> true </prop>
</Props>
</Property>
<Property name = "mappingResources">
</Property>
</Bean>
Then change the ing file:
<Property name = "newsContent" type = "text">
<Column name = "NEWS_CONTENT"/>
</Property>
In the POJO class, you can directly use the String type for free access!