Add bean to spring.
The model group of the current task is shop, which contain a Java entity model book, and the relation value of book is one; More about the model structure of this demo, please click: Demo model structure
There are 2 ways to select the model:
Template: spring.xml.jet
Name: beanConetxt
Ext: The extension is xml
Noteļ¼ this is a merge task.
In merged file the annotation symbols which id is equal to bean, is the insert position.
We use the insert tag to insert the merged content at the same id position, you only need to write the merged content in the template.
Class and class can be used to splice class name, insert BookDaoImpl and BookServiceImpl beans to spring config file.
Result, these 2 bean are inserted into the spring config file.
Tip, you can get the merge symbol in the xml file by code prompt.