---
title: "7.编码剖析Spring装配基本属性的原理"
author: "polokang"
date: "2010-04-18T22:04:24Z"
tags: []
categories: ["企业架构"]
slug: "7-spring"
draft: false
lastmod: "2010-04-18T22:04:24Z"
id: 646914
url: "https://polokang.iteye.com/blog/646914"
---

如何把PersonDaoBean 注入到 PersonServiceBean 中呢？（两种方式）
1.通过构造器参数的方式
2.通过setter方式注入