ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/spring/persistence/applicationContext-persistence.xml]: Could not resolve placeholder 'hibernate.format_sql' in value "${hibernate.format_sql}"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'hibernate.format_sql' in value "${hibernate.format_sql}"
please find relevant code for applicationContext-persistence.xml
`
<!-- Specifies the default settings that are compatible with Hibernate. -->
<bean id="hibernateJpaVendorAdapter"
class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter" />
<!-- Creates the bean that creates the JPA entity manager factory. -->
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="jpaVendorAdapter" ref="hibernateJpaVendorAdapter" />
<property name="packagesToScan">
<array>
<value>activities.data</value>
<value>core.translation.data</value>
<value>core.security.data</value>
<value>core.exception.data</value>
<value>core</value>
<value>application.data</value>
<value>core.datetime.data</value>
<value>application.defaults.data</value>
</array>
</property>
<property name="jpaProperties">
<props>
<!-- Configures the used database dialect. This allows Hibernate to
create SQL that is optimized for the used database. -->
<prop key="hibernate.dialect">${hibernate.dialect}</prop>
<!-- If the value of this property is true, Hibernate writes all SQL
statements to the console. -->
<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
<!-- If the value of this property is true, Hibernate will use prettyprint
when it writes SQL to the console. -->
<prop key="hibernate.format_sql">${hibernate.format_sql}</prop>
<prop key="hibernate.cache.region.factory_class">org.hibernate.cache.ehcache.EhCacheRegionFactory
</prop>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
<prop key="hibernate.jdbc.time_zone">${app.localTimeZone}</prop>
<prop key="net.sf.ehcache.configurationResourceName">/EHCache.xml</prop>
</props>
</property>
</bean>
'
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…