Where to put Groovy bean definitions in a Spring Boot webapp? -
using spring boot can jar created webapp (allowing me execute java -jar test-0.1.0.jar want). configure spring beans using groovy bean def syntax, separate file beans.groovy contain definitions.
how can have groovy file included in jar , how can tell spring load it?
i've seen few examples around web showing how define beans way spring boot, none explain how groovy file included in jar , run webapp.
springapplication
accepts resource
paths sources, include string
ending in ".groovy", e.g.
public static main(string args[]) { springapplication.run("classpath:beans.groovy", args); }
Comments
Post a Comment