博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
On the way learning spring 3
阅读量:7227 次
发布时间:2019-06-29

本文共 2871 字,大约阅读时间需要 9 分钟。

Spring-12 Factory Beans and Methods

 

static method in Class person

non-static method in personFactory

 

 

Spring-13 The P Namespace

注意Constructor 中的Arg 和建立的Bean之间的关系

p: tag 和 property tag 不要同时使用

 

Spring-14 Setting List Property

In beans.xml file

Insert constructor argument ----> (Right click constructor argument)Insert List Element ---->(Right click list element)Insert Value Element 

apple
peach
pear
orange
banana

 Difference between 'set' and 'list'

 

'set' remove duplicate value.

 

Spring-15 Lists of Beans

beans.xml 
App.java     Jungle jungle =(Jungle)context.getBean("jungle");                System.out.println(jungle);
Result Largest: Animal [name=Richard, type=elephant]Others:Animal [name=Igor, type=lion]Animal [name=Bob, type=snake]Animal [name=Richard, type=elephant]

 

Spring-16 Inner Beans

 

Wrong edition

(inner bean)
(This part need to be deleted)

Reason: If you got an bean defined as an inner bean, you cannot refer to it somewhere else

 

 

 Spring-17 Property map

Insert property(foods)--->Insert props--->Insert prop element

banana
bamboo
eggs

 

Spring-18 Arbitrary Maps as Bean Properties

Insert property(animals)--->insert Map--->insert Entity(entity key : lion   value-ref: lion)

 

banana
bamboo
eggs

 

转载于:https://www.cnblogs.com/patrickspring/p/4903319.html

你可能感兴趣的文章
go append函数以及写入
查看>>
关于Java中分层中遇到的一些问题
查看>>
配置 PM2 实现代码自动发布
查看>>
android百种动画侧滑库、步骤视图、TextView效果、社交、搜房、K线图等源码
查看>>
iOS仿今日头条、壁纸应用、筛选分类、三方微博、颜色填充等源码
查看>>
诡异!React stopPropagation失灵
查看>>
Python_OOP
查看>>
个人博客开发系列:评论功能之GitHub账号OAuth授权
查看>>
mongodb--安装和初步使用教程
查看>>
ES6简单总结(搭配简单的讲解和小案例)
查看>>
text-decoration与color属性
查看>>
如何使用Mybatis第三方插件--PageHelper实现分页操作
查看>>
PyCharm搭建GO开发环境(GO语言学习第1课)
查看>>
Android交互
查看>>
提醒我喝水chrome插件开发指南
查看>>
列表数据转树形数据
查看>>
Java新版本的开发已正式进入轨道,版本号18.3
查看>>
从零开始的webpack生活-0x009:FilesLoader装载文件
查看>>
在electron中实现跨域请求,无需更改服务器端设置
查看>>
gitlab-ci配置详解(一)
查看>>