Component Registration in Script System 在脚本系统中注册组件 To refer to our component from a script, the class, its properties and methods must first be registered in the script system. You may place the registration code in a file with the same name as the…
给容器中注册组件的方式 1. 组件注解标注 + 包扫描(适用于自己写的类) //控制层组件 @Controller public class PersonController { } //业务逻辑层组件 @Service public class PersonServic { } //持久层组件 @Repository public class PersonDao { } //其他组件 @Component public class Person { } 包扫描(注解或者xml的方式) 1.使用…