Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 216 Vote(s) - 3.64 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Where do I put my XML beans in a Spring Boot application?

#1
I'm getting back into Spring (currently v4). It's all wonderful now with `@SpringBootApplication` and the other annotations but all the documentation seems to forget to mention how I define other beans in XML!

For example I'd like to create an "SFTP Session Factory" as defined at:

[To see links please register here]


There is a nice bit of XML to define the bean but where on earth do I put it and how do I link it in? Previously I did a:

ApplicationContext context = new ClassPathXmlApplicationContext(
"classpath:applicationContext.xml");

to specify the file name and location but now that I'm trying to use:

ApplicationContext ctx = SpringApplication.run(Application.class);

Where do I put the XML file? Is there a magic spring name to call it?
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through