spring boot - Loading applicationcontext.xml when using SpringApplication -
could provide example of springapplication loads applicationcontext.xml file?
i'm attempting move gwt rpc application restful web service using spring's example (gradle based). have applicationcontext.xml not see how springapplication load it. loading manually via
applicationcontext context = new classpathxmlapplicationcontext(args);
results in empty context. ...and if worked separate 1 returned from
springapplication.run(application.class, args);
or there way external beans app context created springapplication.run?
you can use @importresource
import xml configuration file spring boot application. example:
@springbootapplication @importresource("applicationcontext.xml") public class exampleapplication { public static void main(string[] args) throws exception { springapplication.run(exampleapplication.class, args); } }
Comments
Post a Comment