Generally, when using spring to inject JavaBean, public void setuerdao (userdao) is used ).
Then, you can go to <property name = "uerdao"> <ref local = "userdao"/>.
The first parameter is the name of setxxx. The following figure shows the DaO name configured in spring. If your Dao name is userdao1. In your <property name = "uerdao"> <ref local = "userdao1"/>.
There is also an error caused by nonstandard naming, such as: public void setdbbasedao (dbbasedao Dao ).
In this example, the lower-case letters in front of Dao are used according to the previous configuration. This time will not work.
<Property name = "dbbasedao"> <ref local = "dbbasedao"/>.
At this time, you will still encounter problems according to the previous configuration method. Here we need to configure it like this
<Property name = "dbbasedao"> <ref local = "dbbasedao"/>.
Now, the dB of dbbasedao is used as a lowercase letter. The dB is relative to the user of Example 1, and then the basedao is relative to the DAO of Example 1. In this way, it is passed.