Web all know Spring xml conf file support the prop placeholder,just like :
<contextroperty-placeholder location="classpath:my.properties" />.
<bean id="test" class="com.xxx.SampleClass">
<property name="prop1" value="${my.prop1}">
</bean>
I use the Hibernate orm and use jpa annotion to conf the entity bean,just like :
@Entity
@Table(name="EMPLOYEE",schema="user_bask_sys")
public class Employee implements Serializable {
...
}
In the example ,all the JPA annotion's prop must be plain string,so my question is coming :
the table's schema is not static,it can be change in the delpoyment stage,
So I holp the schema prop be setten like this:
@Entity
@Table(name="EMPLOYEE",schema="${user_bask_sys}")
public class Employee implements Serializable {
...
}
the ${user_bask_sys} reference to a out prop file.
But as I know ,the hibernate engine can't support this style conf,I Know can Spring's org.springframework.orm.hibernate.annotation.Annot ationSessionFactoryBean
dosen't support this style ?
So my question is can I support this placeholder annotion style throngh extend the AnnotationSessionFactoryBean myself.
can anybody tell me can I get it and how can I get it,thanks a lot !!!


roperty-placeholder location="classpath:my.properties" />.
Reply With Quote