« first day (273 days earlier)    last day (15 days later) » 

7:19 AM
@Jens Good Morning, How are you?
 
7:30 AM
@greenhorn Good morning. I am fine. Thanks dor asking. How are you?
 
7:43 AM
@Jens I am fine too. Thanks for asking
@Jens are you assigned with heavy work?
 
@greenhorn yes
 
@Jens i have a doubt on spring boot
@Jens spring boot will read the application.properties by default while starting the application right
 
@greenhorn right
 
@Jens similarly if i want to execute some db scripts while starting the application how i can achieve it?
 
@greenhorn It depends on what you want to do.
@greenhorn If you want for example upgade your db you can use flyway.
If you do something at every startup you can create a bean with a method annotated with @EventListener(ApplicationReadyEvent.class) which wil be executed after the application is started
 
7:56 AM
@Jens if we keep .sql file under resources folder, will it get executed while starting the app?
 
@greenhorn No
 
@Jens in our project they have kept the .sql files under resources folder only and it is getting executed it seems
 
30
Q: How to run SQL scripts and get data on application startup?

LaurynasI am developing a Spring Boot application. At the moment some of my configs are hard coded (e.g. Hystrix properties). So I would like to get these configs on my application start up time or just after that. Is it possible to do that using Spring Boot? I mean to run SQL script on start up and g...

 
8:13 AM
@Jens i think this is the answer stackoverflow.com/a/39281180/3588217
@Jens due to the above answer my sql scripts are executing right?
 
@greenhorn Yes i think so
 
8:51 AM
@Jens Thanks
 
@greenhorn You are welcome
 

« first day (273 days earlier)    last day (15 days later) »