bean 定義
Xml
Annotation
Java based
factoryBean
載入方式
xml載入
ApplicationContext applicationContext=
new ClassPathXmlApplicationContext("bean1.xml","bean2.xml");
<context:component-scan base-package="com.example"></context:component-scan>複製程式碼
java程式碼
Annotation掃描