Hello I have strange problem. I configured spring + hibernate. I`m using annotation configuration but hibernate does not want to create my db structure when I start/republish/restart server 🙁
This is my config from root-context.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
<!-- Root Context: defines shared resources visible to all other web components -->
<!-- Datasource configration -->
<bean id="luxpolDataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost:3306/luxpol" />
<property name="username" value="user" />
<property name="password" value="pass" />
</bean>
<bean id="hibernateSessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="luxpolDataSource" />
<property name="packagesToScan" value="com.fixus.luxpol.bean" />
<property name="annotatedClasses">
<list>
<value>com.fixus.luxpol.bean.House</value>
<value>com.fixus.luxpol.bean.Photo</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</prop>
<prop key="hibernate.format_sql">true</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.hbm2dll.auto">create</prop>
</props>
</property>
</bean>
<mvc:annotation-driven />
<context:component-scan base-package="com.fixus.luxpol" />
<context:component-scan base-package="com.fixus.luxpol.bean" />
I don`t know what is wrong :/
The property is called
hbm2ddl.auto, and nothbm2dll.auto. DDL means Data Definition Language. DLL means Dynamic-Link Library.