Java Tutorial/Spring/Properties File — различия между версиями

Материал из Java эксперт
Перейти к: навигация, поиск
м (1 версия)
 
(нет различий)

Версия 17:44, 31 мая 2010

IOC With Properties File

File: context.properties



source.(class)=SimpleMessageData
destination.(class)=StdoutMessageReporter
service.(class)=DefaultMessageService
service.source(ref)=source
service.destination(ref)=destination





Properties File Based Spring Bean

File: helloworld-context.properties



source.(class)=SimpleMessageData
destination.(class)=StdoutMessageReporter





Property File based Bean Injection

File: context.properties



oracle.(class)=BookwormOracle
encyclopedia.(class)=HardcodedEncyclopedia
oracle.encyclopedia(ref)=encyclopedia





Spring Properties File Base Data Injection

File: helloworld-context.properties



source.(class)=SimpleMessageData
destination.(class)=StdoutMessageReporter
service.(class)=DefaultMessageService
service.source(ref)=source
service.destination(ref)=destination