单项选择题
表达式spel方式注入属性时,在applicationContext.xml配置文件中,注册User和Car类到容器,不包括以下哪个步骤()
A.在com.mhys.bean注册User类到容器
B.在applicationContext.xml配置文件中,注册User类到容器
C.在com.mhys.bean包下,创建Car类,首先,添加brand和carNo两个属性
D.在控制台中,查看输出结果
点击查看答案&解析
相关考题
-
单项选择题
p命名空间注入属性之前需要引入以下()对应约束。
A.xmlns:a="http://www.springframework.org/schema/a"
B.xmlns:p="//www.springframework.org/schema/p"
C.xmlns:p="http://www.springframework.org/schema/p"
D.xmlns:p="http://www.springframework.org" -
多项选择题
set注入时,在applicationContext.xml文件中使用bean元素注入对象,包括以下哪些步骤()
A.在Student类中注入name属性的属性值
B.在测试类中调用getName()方法
C.在测试类中调用setName()方法
D.在控制台中,查看输出结果 -
单项选择题
Spring的优势不包括以下哪个选项()
A.方便解耦,简化开发
B.AOP编程的支持
C.使程序的测试更复杂
D.降低Java EE API的使用难度
