?????????·?????????????????
???????????? ???????[ 2013/7/18 13:31:31 ] ????????
???????????????2?????????μ??????????????3???????????????????????????????????????????????????????????????????????ε?????????Щ????
????????????????????????в??????????????????????????д?ò?????????????????????????????????????ɡ????????Ц????3????????????????????????????????????????????Щ????
??????????????????????????MySQL??
????????????????仯?????
?????????????????????????????
?????????????????????ο?????????仹?????????????
???????????????
????……
??????Щ???????????????????????????????“??????????ī?????”?????????????????????????????????????????
????????????????????μ?????????????????Spring + Spring Data + Hibernate + MySQL?????????????????????????????????????????????Maven??????
????????????????????MySQL
???????????HSQLDB?????????к?????????ο???HSQLDB????????????????????????????????Spring???<jdbc??embedded-database>?????????????????????????applicationContext-test.xml?ж??????????????????
<jdbc:embedded-database id="dataSource" type="HSQL"/>
????HSQL????????????pom.xml??jar????????????????
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.2.8</version>
<scope>test</scope>
</dependency>
???????????????????
???????????????????У??????flyway??????????仯?????Spring????<jdbc??initialize-database>???????SQL????????????????????????????flyway?????????????????????????????flyway?????????SQL??????????flyway?????ο???ruby??db migration???????????????????汾????????е???????????????????е?????????????????β???б?????flyway????????????SQL???????????????????????????????Hibernate??DDL??????????????????????
<!-- Jpa Entity Manager ???? -->
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="dataSource" />
<property name="jpaVendorAdapter" ref="hibernateJpaVendorAdapter"></property>
<property name="packagesToScan" value="com.noyaxe.myapp" />
<property name="jpaProperties">
<props>
<!-- ???????? My_NAME->MyName -->
<prop key="hibernate.ejb.naming_strategy">org.hibernate.cfg.ImprovedNamingStrategy</prop>
<prop key="hibernate.show.sql">true</prop>
<prop key="hibernate.hbm2ddl.auto">update</prop>
</props>
</property>
</bean>
???????????Hibernate??DDL?????????????????1. ?????????????????????????????????????δ????2. ??β?????????DDL??仯??
????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11