1. 程式人生 > >將檔案屬性通過@Value()註解注入不到屬性問題

將檔案屬性通過@Value()註解注入不到屬性問題

掃描註解的類 必須和配置properties的放在tong統一Context下

用註解的包,包括子集 -->

    <context:component-scan base-package="com.java1234.controller" />
    <context:property-placeholder location="classpath:dd.properties" />

必須