p命名标签和c命名标签

1、p标签  p代表属性properties

(1)第一步在xml中添加约束
xmlns:p="http://www.springframework.org/schema/p"
(2)

 

 注:写上User.class就不用强制类型转换了

 

 2、c标签   c代表构造器construction  使用c的前提必须有有参构造

 

 

(1)第一步在xml中添加约束
xmlns:c="http://www.springframework.org/schema/c"
(2)

 

 

 
 
 
posted @ 2021-03-11 18:30  11111ghm  阅读(120)  评论(0编辑  收藏  举报