Spring Util:Properties Injection via Annotations into a bean

前端 未结 5 807
轻奢々
轻奢々 2020-12-23 21:19

If I have 2 .properties files setup in my Spring XML as so:



        
5条回答
  •  北海茫月
    2020-12-23 21:32

    XMl file

    
        
        
        
        
    
    
    

    in java file @Value("#{dbProp}") private Properties dbProperties;

    System.out.println("urllll"+dbProperties.getProperty("jdbc.url"));

提交回复
热议问题