Results 1 to 3 of 3

Thread: Reading SQL files (*.sql) - HOW

  1. #1

    Default Reading SQL files (*.sql) - HOW

    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

  2. #2
    Join Date
    Aug 2006
    Location
    Arequipa-Peru / South America
    Posts
    2,796

    Default

    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

  3. #3
    Join Date
    Aug 2006
    Posts
    129

    Default spring jdbc

    you can use this namespace :

    Code:
    xmlns:jdbc="http://www.springframework.org/schema/jdbc"
    
    http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc.xsd
    and initialize your datasource with your sql scripts :

    Code:
    <jdbc:initialize-database data-source="dataSource" enabled="true" ignore-failures="DROPS">
    	  	<jdbc:script location=""/>
    	  </jdbc:initialize-database>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •