Skip to content

poc to demonstrate sql script on load of spring boot application

Notifications You must be signed in to change notification settings

craxex9141/sql-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sql Script POC

to load .sql file data on maven-install of spring boot application

this is useful while testing application where a set of certain type of data is required


.sql files are to placed in resources folder

schema.sql -> for structure and metadata of tables in a schema

data.sql -> for DML and required data


For loading custom files

  • @Sql annotaion can be used with following parameter
  eg. @Sql("classpath:employee.sql")
 -> which will execute "employee.sql" file in resources folder of application
  • also above annotaion accepts array of arguments
> eg. @Sql({"classpath:sql/policy.sql","classpath:sql/paygrade_classification.sql"}) 

About

poc to demonstrate sql script on load of spring boot application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages