亚洲免费乱码视频,日韩 欧美 国产 动漫 一区,97在线观看免费视频播国产,中文字幕亚洲图片

      1. <legend id="ppnor"></legend>

      2. 
        
        <sup id="ppnor"><input id="ppnor"></input></sup>
        <s id="ppnor"></s>

        java獲得properties文件屬性的方法

        字號(hào):


            public class testSpring extends BaseTest{
            private String url ;
            @Value("#{moblieProps['ds.demo.url']}")
            public void setUrl(String url) {
            this.url = url;
            }
            @Test
            public void testGetValue(){
            System.out.println( url);
            }
            }
            這是一個(gè)junit單元測(cè)試 用來獲得里面的屬性,其中set方法上面的注解來自于這個(gè)文件spring的xml
            <util:properties id="moblieProps" location="classpath:config.properties" />
            然后呢,key來自于config.properties
            ds.demo.url=jdbc:oracle:thin:@192.168.12.150:1521:xxx
            輸出結(jié)果是這樣的
            jdbc:oracle:thin:@192.168.12.150:1521:xxx