Hi,
What is the best way to read property files and SQL files (.sql) using Spring API. I know PopertyPlaceHolderConfigurer can be used for variables and ResourceBundle can be used for property/xml files, but for SQL files ...??/
thanks
Hi,
What is the best way to read property files and SQL files (.sql) using Spring API. I know PopertyPlaceHolderConfigurer can be used for variables and ResourceBundle can be used for property/xml files, but for SQL files ...??/
thanks
Hello
They could be fine.
But if you download STS and create some Spring Templates projects you going to realize that these templates creates the most basic configuration about this.
Check it out
- Manuel Jordan
Kill Your Pride, Share Your Knowledge With All
The Fear Of The LORD Is The Beginning Of Knowledge, But Fools Despise Wisdom And Discipline. Proverbs 1:7
Blog
Technical Reviewer of Apress
- Pro SpringSource dm Server
- Spring Enterprise Recipes: A Problem-Solution Approach
- Spring Recipes: A Problem-Solution Approach, 2nd Edition
- Pro Spring Integration
- Pro Spring Batch
- Pro Spring 3
- Pro Spring MVC: With Web Flow
- Pro Spring Security
you can use this namespace :
and initialize your datasource with your sql scripts :Code:xmlns:jdbc="http://www.springframework.org/schema/jdbc" http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
Code:<jdbc:initialize-database data-source="dataSource" enabled="true" ignore-failures="DROPS"> <jdbc:script location=""/> </jdbc:initialize-database>