I started to work on a Spring project from scratch and while I was trying to add a new Spring bean configuration file, I just don't see it there. The project structure and the selection wizard is as following,
Figure: No Spring section here in the selection wizard
Figure: project structure
How to add a bean configuration file in the project ? I tried to get a template and add in the project. However, I don't see the different tabs (such as, mvc, context etc ) in the file page. The maven dependencies are fine and it's dynamic web project. I also tried with maven-archetype-webapp as starting point of the project.
You will need to add spring. xml file at the location - src/main/resources folder. You can have your directory structure inside this directory as - src/main/resources/com/vipin/dao. src/main/java directory is preferred for java classes.
You may load multiple Spring bean configuration files in the code : ApplicationContext context = new ClassPathXmlApplicationContext(new String[] {"Spring-Common. xml", "Spring-Connection. xml","Spring-ModuleA.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With