Bean.xml can also be springxxx.xml or config.xml... In short, it can be... XXX.xml. There is even no need for xml, and there is no problem if it is written directly in the class. The "Bean.xml" here is just the configuration file used by spring to configure.
As for Java beans, they are generally modified by public, that is, public classes. Then there is generally a parameterless constructor.
Bean.xml can also be springxxx.xml or config.xml... In short, it can be... XXX.xml. There is even no need for xml, and there is no problem if it is written directly in the class. The "Bean.xml" here is just the configuration file used by spring to configure.
As for Java beans, they are generally modified by public, that is, public classes. Then there is generally a parameterless constructor.
Above.
JavaBean must meet the following conditions:
public modifies this class
Private member variables
Corresponding to the public get and set methods of private member variables
No parameter constructor
bean.xml refers to the way to configure beans, right? In fact, in spring, it is recommended to use annotations to configure beans
You are referring to
bean.xml
是指用xml
文件的方式配置bean
吧?启动时载入此文件,按照配置将一个个bean(Java Beans)
add to the container after instantiation.