Changeset 4583


Ignore:
Timestamp:
02/27/14 16:29:27 (10 years ago)
Author:
twagoo
Message:

new vlo config factory to support partial configuration via context parameters

Location:
vlo/branches/vlo-3.0/vlo-web-app/src
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • vlo/branches/vlo-3.0/vlo-web-app/src/main/java/eu/clarin/cmdi/vlo/config/VloSpringConfig.java

    r4582 r4583  
    6868    @Bean
    6969    public VloConfigFactory vloConfigFactory() {
    70         return new DefaultVloConfigFactory();
     70        return new ServletVloConfigFactory();
    7171    }
    7272
  • vlo/branches/vlo-3.0/vlo-web-app/src/main/webapp/META-INF/context.xml

    r4466 r4583  
    11<?xml version="1.0" encoding="UTF-8"?>
    2 <Context antiJARLocking="true" path="/vlo-web-app"/>
     2<Context antiJARLocking="true" path="/vlo-web-app">
     3    <!--
     4        If set, configuration will get read from this external location
     5
     6
     7    <Parameter
     8        name="eu.carlin.cmdi.vlo.config.location"
     9        value="/Users/twagoo/vlo/vlo3/VloConfig.xml"/>
     10    -->
     11   
     12    <!--
     13        If set, web app will connect to this SOLR server instead of the one
     14        specified in the configuration file
     15
     16
     17    <Parameter
     18        name="eu.carlin.cmdi.vlo.solr.serverUrl"
     19        value="http://localhost:8080/vlo_solr/core0/"/>
     20    -->
     21</Context>
  • vlo/branches/vlo-3.0/vlo-web-app/src/main/webapp/WEB-INF/applicationContext.xml

    r4498 r4583  
    99    <context:annotation-config/>
    1010    <bean class="eu.clarin.cmdi.vlo.config.VloSpringConfig"/>   
     11   
     12    <!-- Bean to enable context parameters as a properties source -->
     13    <bean class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer">
     14        <property name="ignoreUnresolvablePlaceholders" value="true" />
     15        <property name="ignoreResourceNotFound" value="true"/>
     16    </bean>
    1117</beans>
  • vlo/branches/vlo-3.0/vlo-web-app/src/main/webapp/WEB-INF/web.xml

    r4498 r4583  
    4444        <param-name>contextConfigLocation</param-name> 
    4545        <param-value>WEB-INF/applicationContext.xml</param-value> 
    46     </context-param> 
     46    </context-param>
    4747</web-app>
  • vlo/branches/vlo-3.0/vlo-web-app/src/test/java/eu/clarin/cmdi/vlo/wicket/pages/TestFacetedSearchPage.java

    r4582 r4583  
    22
    33import eu.clarin.cmdi.vlo.VloWicketApplication;
     4import eu.clarin.cmdi.vlo.config.DefaultVloConfigFactory;
     5import eu.clarin.cmdi.vlo.config.VloConfigFactory;
    46import eu.clarin.cmdi.vlo.config.VloSpringConfig;
    57import eu.clarin.cmdi.vlo.pojo.QueryFacetsSelection;
     
    2325import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
    2426import org.springframework.test.context.support.AnnotationConfigContextLoader;
    25 
    2627
    2728/**
     
    5354            return mockery().mock(SolrDocumentService.class);
    5455        }
     56
     57        @Override
     58        public VloConfigFactory vloConfigFactory() {
     59            //TODO: Separate test config? -> override vloConfig() instead
     60            return new DefaultVloConfigFactory();
     61        }
     62
    5563    }
    5664
Note: See TracChangeset for help on using the changeset viewer.