Package org.springframework.security.util

Examples of org.springframework.security.util.InMemoryResource


        this(xml, "3.2", parent);
    }

    public InMemoryXmlApplicationContext(String xml, String secVersion, ApplicationContext parent) {
        String fullXml = BEANS_OPENING + secVersion + ".xsd'>\n" + xml + BEANS_CLOSE;
        inMemoryXml = new InMemoryResource(fullXml);
        setAllowBeanDefinitionOverriding(true);
        setParent(parent);
        refresh();
    }
View Full Code Here


        "" + NEWLINE +
        "[block]" + NEWLINE +
        "m = p" + NEWLINE +
        "n = ${a}" + NEWLINE +  // property from [global]
        "o = ${input}" + NEWLINE;  // property from injected properties
    Resource resource = new InMemoryResource(text.getBytes(Charsets.UTF_8), "Test"
    );
    properties.put("input", "text");
   
    ComponentConfig test = new ComponentConfig();
    loader.load(resource, 0, test);
View Full Code Here

  @Test(expectedExceptions = RuntimeException.class)
  public void test_loadInvalid_doubleKey() {
    ConcurrentMap<String, String> properties = new ConcurrentHashMap<String, String>();
    ComponentConfigIniLoader loader = new ComponentConfigIniLoader(LOGGER, properties );
    Resource resource = new InMemoryResource(
        "[block]" + NEWLINE +
        "m = p" + NEWLINE +
        "m = s" + NEWLINE
    );
   
View Full Code Here

  @Test(expectedExceptions = RuntimeException.class)
  public void test_loadInvalid_replacementNotFound() {
    ConcurrentMap<String, String> properties = new ConcurrentHashMap<String, String>();
    ComponentConfigIniLoader loader = new ComponentConfigIniLoader(LOGGER, properties );
    Resource resource = new InMemoryResource(
        "[block]" + NEWLINE +
        "m = ${notFound}" + NEWLINE
    );
   
    loader.load(resource, 0, new ComponentConfig());
View Full Code Here

  @Test(expectedExceptions = RuntimeException.class)
  public void test_loadInvalid_propertyNotInGroup() {
    ConcurrentMap<String, String> properties = new ConcurrentHashMap<String, String>();
    ComponentConfigIniLoader loader = new ComponentConfigIniLoader(LOGGER, properties );
    Resource resource = new InMemoryResource(
        "m = foo" + NEWLINE
    );
   
    loader.load(resource, 0, new ComponentConfig());
  }
View Full Code Here

  @Test(expectedExceptions = RuntimeException.class)
  public void test_loadInvalid_propertyNoEquals() {
    ConcurrentMap<String, String> properties = new ConcurrentHashMap<String, String>();
    ComponentConfigIniLoader loader = new ComponentConfigIniLoader(LOGGER, properties );
    Resource resource = new InMemoryResource(
        "[block]" + NEWLINE +
        "m" + NEWLINE
    );
   
    loader.load(resource, 0, new ComponentConfig());
View Full Code Here

  @Test(expectedExceptions = RuntimeException.class)
  public void test_loadInvalid_propertyEmptyKey() {
    ConcurrentMap<String, String> properties = new ConcurrentHashMap<String, String>();
    ComponentConfigIniLoader loader = new ComponentConfigIniLoader(LOGGER, properties );
    Resource resource = new InMemoryResource(
        "[block]" + NEWLINE +
        "= foo" + NEWLINE
    );
   
    loader.load(resource, 0, new ComponentConfig());
View Full Code Here

TOP

Related Classes of org.springframework.security.util.InMemoryResource

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.