1. What I learned today is mainly the spring injection method. In addition to the constructor injection, there are also common set injection methods, in the configuration file, the configuration metadata of the set injection mode is <property name = "corresponding to the set method. The words following the set method do not seem to have much to do with the attributes, it is only related to the value after the set of the set Method) "value =" the value injected to the set Method "> </property>.
2. Common Property injection includes the basic types of int, String, and lis, map, and set. The basic types of injection are directly as follows: <property name = "setName" value = "injected value"> </property>. The List property injection of the collection type is as follows, <property> <list> <value> value 1 injected into the list set </value> <value> value 2 injected into the list set </value> · </ list> </property>, set injection is the same as list injection. map injection: <property> <map> <entry key = "" value = ""> · </map> </property>.
3. spring property Editor: the custom property editor first inherits the PropertyEditorSuppert class provided by spring and overwrites the setAsText () method of this class to define the attributes to be processed in this method. Finally, it needs to be injected into the spring container, that is, configure bean for the custom class.
4. Read the configuration file. A single file can directly create a subclass of the beanFactory factory class, for example, new xmlApplicationFactory ("configuration file name"). If there are multiple files, you can use arrays, put the file name in the array, and then read the array, or use a certain rule naming configuration file, and then use the struts2 inside the mode, such as: configuration file 1: beans-editor.xml, file 2: beans-base.xml, then you can write the matching format new xmlApplicationFactory ("beans -*. xml ").