Autowiring & Dependency Injection
改寫透過Spring來注入UserValidationService給LoginController
輸入PIG 及 isCoolPIG得
主要是因為todo-servlet.xml已定義
如上component-scan指定com.pig這個package
以下定義的@Service或@Autowired都給Spirng管控
所以目前LoginController或UserValidationService
只要有定Spring的annotation皆由Spring管控
log4j.properties裡面設log4j.rootLogger=DEBUG可看到