Java Spring Beans 常见问题/学习笔记

Beans Property 不可用/报错?

检查property是否在beans块内(注意在代码结尾,例如:

<bean id="helloWorld" class="com.example.springmaverndemo.HelloWorld"/>

<bean id="helloWorld" class="com.example.springmaverndemo.HelloWorld">

 </bean>

实现了相同的效果,但是第一句直接结束了bean定义,第二句在第三行才结束了bean定义。