Package org.springframework.core.env

Examples of org.springframework.core.env.PropertySource$ComparisonPropertySource


    @Test
    public void test() throws IOException {
        Map<String, Object> map = new HashMap<>();
        map.put("encoding", "gbk");
        PropertySource propertySource1 = new MapPropertySource("map", map);
        System.out.println(propertySource1.getProperty("encoding"));

        ResourcePropertySource propertySource2 = new ResourcePropertySource("resource", "classpath:resources.properties");
        System.out.println(propertySource2.getProperty("encoding"));
    }
View Full Code Here


    @Test
    public void test2() throws IOException {

        Map<String, Object> map = new HashMap<>();
        map.put("encoding", "gbk");
        PropertySource propertySource1 = new MapPropertySource("map", map);

        ResourcePropertySource propertySource2 = new ResourcePropertySource("resource", "classpath:resources.properties");

        CompositePropertySource compositePropertySource = new CompositePropertySource("composite");
        compositePropertySource.addPropertySource(propertySource1);
View Full Code Here

    @Test
    public void test3() throws IOException {

        Map<String, Object> map = new HashMap<>();
        map.put("encoding", "gbk");
        PropertySource propertySource1 = new MapPropertySource("map", map);

        ResourcePropertySource propertySource2 = new ResourcePropertySource(
                "resource", "classpath:resources.properties");

View Full Code Here

TOP

Related Classes of org.springframework.core.env.PropertySource$ComparisonPropertySource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.