在spring中, @Component 注解表示( )。
A. 定义一个Spring管理的Bean
B. 定义自动注入
C. 定义该Bean为单例
D. 定义该一个切面
在Spring中,注入方式是( )。
A. 构造注入
B. 自动注入
C. 代理注入
D. 设置注入
在Spring配置文件中,有如下配置: 其中scope的值还可以是( )。
A. constructor
B. prototype
C. abstract
D. default
对于以下代码说法正确的是( ) public class EmpAction { private EmpBiz empBiz; private ListempList; public String searchAll(){ empList = empBiz.searchAllEmp(); return "success"; } ……省略getter/setter方法 } ......省略dataSource和SessionFactory配置
A. 配置正确,执行searchAll方法能查出所有的Emp对象
B. 出现编译错误
C. 因为没有配置Action,所以在调用searchAll方法时出现NullPointerException异常
D. EmpAction中的empBiz必须通过new来创建