Project

General

Profile

« Previous | Next » 

Revision 50505

Added by Stefanos Gatsios about 5 years ago

fixed property error by overriding the propertyholder

View differences:

modules/dnet-claims-service/branches/redis/src/main/webapp/WEB-INF/applicationContext.xml
1 1
<?xml version="1.0" encoding="UTF-8"?>
2 2

  
3 3
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
	   xmlns:context="http://www.springframework.org/schema/context"
5
	   xmlns="http://www.springframework.org/schema/beans"
6
	   xmlns:security="http://www.springframework.org/schema/security"
7
	   xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
4
       xmlns:context="http://www.springframework.org/schema/context"
5
       xmlns="http://www.springframework.org/schema/beans"
6
       xmlns:security="http://www.springframework.org/schema/security"
7
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
8 8
	http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
9 9
	http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd">
10 10

  
11
	<import resource="classpath:META-INF/cxf/cxf.xml" />
12
<!-- 	<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> -->
13
<!-- 	<import resource="classpath:META-INF/cxf/cxf-extension-jaxws.xml" /> -->
14
<!-- 	<import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> -->
11
    <import resource="classpath:META-INF/cxf/cxf.xml"/>
12
    <!-- 	<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> -->
13
    <!-- 	<import resource="classpath:META-INF/cxf/cxf-extension-jaxws.xml" /> -->
14
    <!-- 	<import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> -->
15 15

  
16
	<import resource="classpath*:/gr/uoa/di/driver/app/springContext-commons.xml" />
17
	<import resource="classpath*:/gr/uoa/di/driver/util/springContext-locators.xml" />
18
	<import resource="classpath*:/gr/uoa/di/driver/app/springContext-registrator.xml" />
19
	<import resource="classpath*:/eu/dnetlib/clients/ws/springContext-locatorFactory.xml" />
20
	<import resource="classpath*:/eu/dnetlib/soap/cxf/applicationContext-eprbuilders.xml"/>
21
	<import resource="classpath*:/gr/uoa/di/driver/app/springContext-lookupFactory.xml" />
22
	<import resource="classpath*:/gr/uoa/di/driver/app/springContext-lookupClients.xml" />
23
	<import resource="classpath*:/eu/dnetlib/enabling/hcm/springContext-hcmService.xml" />
24
	<import resource="classpath*:/eu/dnetlib/data/claims/migration/springContext-claimsDemo.xml"/>
25
	<import resource="classpath*:/eu/dnetlib/openaire/rest/springContext-claims-authorization.xml"/>
26
	<!--
27
	<import resource="classpath*:/eu/dnetlib/openaire/thrift/springContext-openaire-thrift.xml" /> -->
16
    <import resource="classpath*:/gr/uoa/di/driver/app/springContext-commons.xml"/>
17
    <import resource="classpath*:/gr/uoa/di/driver/util/springContext-locators.xml"/>
18
    <import resource="classpath*:/gr/uoa/di/driver/app/springContext-registrator.xml"/>
19
    <import resource="classpath*:/eu/dnetlib/clients/ws/springContext-locatorFactory.xml"/>
20
    <import resource="classpath*:/eu/dnetlib/soap/cxf/applicationContext-eprbuilders.xml"/>
21
    <import resource="classpath*:/gr/uoa/di/driver/app/springContext-lookupFactory.xml"/>
22
    <import resource="classpath*:/gr/uoa/di/driver/app/springContext-lookupClients.xml"/>
23
    <import resource="classpath*:/eu/dnetlib/enabling/hcm/springContext-hcmService.xml"/>
24
    <import resource="classpath*:/eu/dnetlib/data/claims/migration/springContext-claimsDemo.xml"/>
25
    <import resource="classpath*:/eu/dnetlib/openaire/rest/springContext-claims-authorization.xml"/>
26
    <!--
27
    <import resource="classpath*:/eu/dnetlib/openaire/thrift/springContext-openaire-thrift.xml" /> -->
28
    <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" id="propertySourcesPlaceholderConfigurer">
29
        <property name="order" value="2"/>
30
        <property name="ignoreUnresolvablePlaceholders" value="true"/>
31
        <property name="properties">
32
            <bean class="eu.dnetlib.conf.WebappContextProperyFactory">
33
                <property name="propertyFetcher">
34
                    <bean class="eu.dnetlib.conf.PropertyFetcher"/>
35
                </property>
36
            </bean>
37
        </property>
38
        <property name="locations">
39
            <list>
40
                <value>classpath*:/eu/**/applicationContext*.properties</value>
41
                <value>classpath*:/eu/dnetlib/applicationContext-defaultProperties.properties</value>
42
                <value>classpath*:/gr/**/springContext-commons.properties</value>
43
                <value>classpath*:/gr/**/springContext-registrator.properties</value>
44
                <value>classpath*:/gr/**/springContext-locators.properties</value>
28 45

  
29
	<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
30
		<property name="order" value="2" />
31
		<property name="ignoreUnresolvablePlaceholders" value="true" />
32
		<property name="properties">
33
			<bean class="eu.dnetlib.conf.WebappContextProperyFactory">
34
				<property name="propertyFetcher">
35
					<bean class="eu.dnetlib.conf.PropertyFetcher" />
36
				</property>
37
			</bean>
38
		</property>
39
		<property name="locations">
40
						<list>
41
							<value>classpath*:/eu/**/applicationContext*.properties</value>
42
							<value>classpath*:/eu/dnetlib/applicationContext-defaultProperties.properties</value>
43
							<value>classpath*:/gr/**/springContext-commons.properties</value>
44
								<value>classpath*:/gr/**/springContext-registrator.properties</value>
45
								<value>classpath*:/gr/**/springContext-locators.properties</value>
46
                <value>classpath*:/eu/dnetlib/data/claims/migration/springContext-claimsDemo.properties</value>
47
                <value>classpath*:/eu/dnetlib/openaire/rest/springContext-claims-authorization.properties</value>
48
                <value>classpath*:/gr/uoa/di/driver/app/springContext-lookupFactory.properties</value>
49
                <value>classpath*:/eu/dnetlib/enabling/hcm/springContext-hcmService.properties</value>
46 50

  
47
								<value>classpath*:/eu/dnetlib/data/claims/migration/springContext-claimsDemo.properties</value>
48
								<value>classpath*:/eu/dnetlib/openaire/rest/springContext-claims-authorization.properties</value>
49
								<value>classpath*:/gr/uoa/di/driver/app/springContext-lookupFactory.properties</value>
50
								<value>classpath*:/eu/dnetlib/enabling/hcm/springContext-hcmService.properties</value>
51
                <value>classpath*:/eu/dnetlib/openaire/applicationContext-openaire.properties</value>
52
                <value>classpath*:/eu/dnetlib/openaire/thrift/springContext-openaire-thrift.properties</value>
51 53

  
52
								<value>classpath*:/eu/dnetlib/openaire/applicationContext-openaire.properties</value>
53
								<value>classpath*:/eu/dnetlib/openaire/thrift/springContext-openaire-thrift.properties</value>
54 54

  
55
                <value>classpath*:dnet-site-override.properties</value>
56
                <value>classpath*:dnet-dnet-openaire-connector-wizard.properties</value>
57
                <value>classpath*:dnet-dnet-openaire-connector-override.properties</value>
55 58

  
56
								<value>classpath*:dnet-site-override.properties</value>
57
								<value>classpath*:dnet-dnet-openaire-connector-wizard.properties</value>
58
								<value>classpath*:dnet-dnet-openaire-connector-override.properties</value>
59
                <value>classpath*:/uoa-override.properties</value>
60
                <value>classpath*:/dnet-override.properties</value>
59 61

  
60
								<value>classpath*:/uoa-override.properties</value>
61
								<value>classpath*:/dnet-override.properties</value>
62
                <value>classpath*:dnet-force-override.properties</value>
62 63

  
63
								<value>classpath*:dnet-force-override.properties</value>
64
            </list>
65
        </property>
66
    </bean>
64 67

  
65
						</list>
66
				</property>
67
			</bean>
68
    <context:annotation-config/>
69
    <context:component-scan base-package="eu.dnetlib.openaire.rest"/>
68 70

  
69
	<context:annotation-config />
70
	<context:component-scan base-package="eu.dnetlib.openaire.rest"/>
71
	<bean class="org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration"/>
71
    <bean class="org.springframework.session.data.redis.config.annotation.web.http.RedisHttpSessionConfiguration"/>
72
    <bean class="org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory">
73
        <constructor-arg value="83.212.101.85"/>
74
        <constructor-arg value="6379"/>
75
        <!--<property name="password" value="${redis.password:#{null}}"/>-->
76
    </bean>
72 77

  
78
    <bean class="org.springframework.session.web.http.DefaultCookieSerializer">
79
        <property name="cookieName" value="SESSION"/>
80
        <property name="cookiePath" value="/"/>
81
    </bean>
73 82

  
74
	<bean class="org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory">
75
		<constructor-arg value="127.0.0.1" />
76
		<constructor-arg value="6379" />
77
		<!--<property name="password" value="${redis.password:#{null}}"/>-->
78
	</bean>
83
    <!-- Enable SPEL annotation-->
84
    <security:global-method-security pre-post-annotations="enabled" proxy-target-class="true"
85
                                     authentication-manager-ref="authenticationManager"/>
79 86

  
80
	<bean class="org.springframework.session.web.http.DefaultCookieSerializer">
81
		<property name="cookieName" value="SESSION"/>
82
		<property name="cookiePath" value="/"/>
83
	</bean>
87
    <security:http auto-config="false" use-expressions="true"
88
                   disable-url-rewriting="true" entry-point-ref="authenticationEntryPoint"
89
                   pattern="/**">
90
    </security:http>
84 91

  
85
	<!-- Enable SPEL annotation-->
86
	<security:global-method-security pre-post-annotations="enabled" proxy-target-class="true"
87
									 authentication-manager-ref="authenticationManager"/>
92
    <!--Disable authentication from this service-->
93
    <bean id="authenticationEntryPoint"
94
          class="org.springframework.security.web.authentication.Http403ForbiddenEntryPoint"/>
95
    <security:authentication-manager alias="authenticationManager"/>
88 96

  
89
	<security:http auto-config="false" use-expressions="true"
90
				   disable-url-rewriting="true" entry-point-ref="authenticationEntryPoint"
91
				   pattern="/**">
92
	</security:http>
97
    <!--
98
        <context:component-scan base-package="eu.dnetlib.api.enabling"/>
99
    -->
93 100

  
94
	<!--Disable authentication from this service-->
95
	<bean id="authenticationEntryPoint"
96
		  class="org.springframework.security.web.authentication.Http403ForbiddenEntryPoint"/>
97
	<security:authentication-manager alias="authenticationManager"/>
101
    <!-- if the following import is not the last one, something overrides bus
102
        configuration disabling logging and any other customized feature. -->
98 103

  
99
<!--
100
	<context:component-scan base-package="eu.dnetlib.api.enabling"/>
101
-->
104
    <import resource="./cxf.xml"/>
102 105

  
103
	<!-- if the following import is not the last one, something overrides bus
104
		configuration disabling logging and any other customized feature. -->
105

  
106
	<import resource="./cxf.xml" />
107

  
108 106
</beans>
modules/dnet-claims-service/branches/redis/src/main/webapp/WEB-INF/web.xml
1
<!DOCTYPE web-app PUBLIC
2
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
3
 "http://java.sun.com/dtd/web-app_2_3.dtd" >
1
<?xml version="1.0" encoding="UTF-8"?>
4 2
<web-app>
5
	<display-name>DNet-2.0 container web app</display-name>
6
	<context-param>
7
		<param-name>contextConfigLocation</param-name>
8
		<param-value>/WEB-INF/applicationContext.xml</param-value>
9
	</context-param>
3
    <display-name>DNet-2.0 container web app</display-name>
10 4
    <context-param>
5
        <param-name>contextConfigLocation</param-name>
6
        <param-value>/WEB-INF/applicationContext.xml</param-value>
7
    </context-param>
8
    <context-param>
11 9
        <param-name>log4jConfigLocation</param-name>
12 10
        <param-value>/WEB-INF/log4j.properties</param-value>
13 11
    </context-param>
14 12
    <listener>
15 13
        <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
16 14
    </listener>
17
	<listener>
18
		<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
19
	</listener>
20
	<listener>
21
		<listener-class>eu.dnetlib.data.emailSender.EmailScheduler</listener-class>
22
	</listener>
15
    <listener>
16
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
17
    </listener>
18
    <listener>
19
        <listener-class>eu.dnetlib.data.emailSender.EmailScheduler</listener-class>
20
    </listener>
23 21

  
24 22

  
23
    <servlet>
24
        <servlet-name>jersey-serlvet</servlet-name>
25
        <!--<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>-->
26
        <servlet-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class>
27
        <init-param>
28
            <!--<param-name>com.sun.jersey.config.property.packages</param-name>-->
29
            <param-name>com.sun.jersey.config.property.packages</param-name>
30
            <param-value>eu.dnetlib.openaire.rest</param-value>
31
        </init-param>
32
        <load-on-startup>1</load-on-startup>
33
    </servlet>
25 34

  
26
	<servlet>
27
		<servlet-name>jersey-serlvet</servlet-name>
28
		<!--<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>-->
29
		<servlet-class>com.sun.jersey.spi.spring.container.servlet.SpringServlet</servlet-class>
30
		<init-param>
31
			<!--<param-name>com.sun.jersey.config.property.packages</param-name>-->
32
			<param-name>com.sun.jersey.config.property.packages</param-name>
33
			<param-value>eu.dnetlib.openaire.rest</param-value>
34
		</init-param>
35
		<load-on-startup>1</load-on-startup>
36
	</servlet>
35
    <servlet-mapping>
36
        <servlet-name>jersey-serlvet</servlet-name>
37
        <url-pattern>/rest/*</url-pattern>
38
    </servlet-mapping>
37 39

  
38
	<servlet-mapping>
39
		<servlet-name>jersey-serlvet</servlet-name>
40
		<url-pattern>/rest/*</url-pattern>
41
	</servlet-mapping>
40
    <filter>
41
        <filter-name>CorsFilter</filter-name>
42
        <filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
43
        <init-param>
44
            <param-name>cors.allowed.origins</param-name>
45
            <param-value>*</param-value>
46
        </init-param>
47
        <init-param>
48
            <param-name>cors.allowed.methods</param-name>
49
            <param-value>GET,POST,HEAD,OPTIONS,DELETE</param-value>
50
        </init-param>
51
        <init-param>
52
            <param-name>cors.exposed.headers</param-name>
53
            <param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials,Access-Control-Allow-Methods
54
            </param-value>
55
        </init-param>
56
        <init-param>
57
            <param-name>cors.support.credentials</param-name>
58
            <param-value>true</param-value>
59
        </init-param>
60
        <init-param>
61
            <param-name>cors.allowed.headers</param-name>
62
            <param-value>
63
                Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers,X-XSRF-TOKEN,withcredentials
64
            </param-value>
65
        </init-param>
66
    </filter>
67
    <filter-mapping>
68
        <filter-name>CorsFilter</filter-name>
69
        <url-pattern>/*</url-pattern>
70
    </filter-mapping>
42 71

  
43
	<filter>
44
		<filter-name>CorsFilter</filter-name>
45
		<filter-class>org.apache.catalina.filters.CorsFilter</filter-class>
46
		<init-param>
47
			<param-name>cors.allowed.origins</param-name>
48
			<param-value>*</param-value>
49
		</init-param>
50
		<init-param>
51
			<param-name>cors.allowed.methods</param-name>
52
			<param-value>GET,POST,HEAD,OPTIONS,DELETE</param-value>
53
		</init-param>
54
		<init-param>
55
			<param-name>cors.exposed.headers</param-name>
56
			<param-value>Access-Control-Allow-Origin,Access-Control-Allow-Credentials,Access-Control-Allow-Methods</param-value>
57
		</init-param>
58
		<init-param>
59
			<param-name>cors.support.credentials</param-name>
60
			<param-value>true</param-value>
61
		</init-param>
62
		<init-param>
63
			<param-name>cors.allowed.headers</param-name>
64
			<param-value>Content-Type,X-Requested-With,accept,Origin,Access-Control-Request-Method,Access-Control-Request-Headers,X-XSRF-TOKEN,withcredentials</param-value>
65
		</init-param>
66
	</filter>
67
	<filter-mapping>
68
		<filter-name>CorsFilter</filter-name>
69
		<url-pattern>/*</url-pattern>
70
	</filter-mapping>
72
    <filter>
73
        <filter-name>springSessionRepositoryFilter</filter-name>
74
        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
75
    </filter>
71 76

  
72
	<filter>
73
		<filter-name>springSessionRepositoryFilter</filter-name>
74
		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
75
	</filter>
77
    <filter-mapping>
78
        <filter-name>springSessionRepositoryFilter</filter-name>
79
        <url-pattern>/*</url-pattern>
80
        <dispatcher>REQUEST</dispatcher>
81
        <dispatcher>ERROR</dispatcher>
82
    </filter-mapping>
76 83

  
77
	<filter-mapping>
78
		<filter-name>springSessionRepositoryFilter</filter-name>
79
		<url-pattern>/*</url-pattern>
80
		<dispatcher>REQUEST</dispatcher>
81
		<dispatcher>ERROR</dispatcher>
82
	</filter-mapping>
84
    <filter>
85
        <filter-name>springSecurityFilterChain</filter-name>
86
        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
87
        <init-param>
88
            <param-name>contextAttribute</param-name>
89
            <param-value>org.springframework.web.servlet.FrameworkServlet.CONTEXT.springrest</param-value>
90
        </init-param>
91
    </filter>
83 92

  
84
	<filter>
85
		<filter-name>springSecurityFilterChain</filter-name>
86
		<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
87
		<init-param>
88
			<param-name>contextAttribute</param-name>
89
			<param-value>org.springframework.web.servlet.FrameworkServlet.CONTEXT.springrest</param-value>
90
		</init-param>
91
	</filter>
93
    <filter-mapping>
94
        <filter-name>springSecurityFilterChain</filter-name>
95
        <url-pattern>/*</url-pattern>
96
    </filter-mapping>
92 97

  
93
	<filter-mapping>
94
		<filter-name>springSecurityFilterChain</filter-name>
95
		<url-pattern>/*</url-pattern>
96
	</filter-mapping>
97 98

  
98

  
99 99
</web-app>
modules/dnet-claims-service/branches/redis/pom.xml
51 51
			<groupId>org.springframework.session</groupId>
52 52
			<artifactId>spring-session-data-redis</artifactId>
53 53
			<version>1.3.1.RELEASE</version>
54
			<type>pom</type>
55 54
		</dependency>
56 55
		<dependency>
57 56
			<groupId>biz.paluch.redis</groupId>
58 57
			<artifactId>lettuce</artifactId>
59 58
			<version>3.5.0.Final</version>
60 59
		</dependency>
61

  
62
	</dependencies>
60
    </dependencies>
63 61
</project>

Also available in: Unified diff