Spring+hibernate+derby to created an restful web service project.
Verision 1.0.0 Start Steps:
- Check Eclipse properties of derbyLookup "Web Deployment Assembly";
- Run Unit Test "DerbyDEVTest" and "DerbyPRODTest" generate the Derby Database;
Web.xml Setting
- Web.xml add "spring.profiles.active" to control with database will be choosed to connect. (@ActiveProfiles);
- Web.xml take notice of the loading sequences between and , in case of "'territoryService': Injection of autowired dependencies failed;"
- Filter and Listener (ContextLoaderListener);
Spring+Hibernate Setting
- Seprate the spring and common-db file, looks good to seprate AbstractTransactionalJUnit4SpringContextTests and AbstractJUnit4SpringContextTests;
- RestFul ContentNegotiationManagerFactoryBean;
- JPA Tools another project to build @Entity;
- SessionFactory openSession and Close session;