<property name="doc" type="org.springframework.orm.hibernate3.support.BlobByteArrayType">
<column name="DOC" />
</property>
type属性使用org.springframework.orm.hibernate3.support.BlobByteArrayType
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
${hibernate.dialect}
</prop>
</props>
</property>
<property name="mappingLocations">
<value>classpath:/**/*.hbm.xml< alue>
</property>
<property name="lobHandler" ref="lobHandler" />
</bean>
然后在pojo里把对应的属性改成private byte[] doc;
字节数组类型
<Connector port="8888" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="GBK"/>
<column name="DOC" />
</property>
type属性使用org.springframework.orm.hibernate3.support.BlobByteArrayType
<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource" ref="dataSource"/>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">
${hibernate.dialect}
</prop>
</props>
</property>
<property name="mappingLocations">
<value>classpath:/**/*.hbm.xml< alue>
</property>
<property name="lobHandler" ref="lobHandler" />
</bean>
然后在pojo里把对应的属性改成private byte[] doc;
字节数组类型
<Connector port="8888" maxHttpHeaderSize="8192"
maxThreads="150" minSpareThreads="25" maxSpareThreads="75"
enableLookups="false" redirectPort="8443" acceptCount="100"
connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="GBK"/>