| author | ymh <ymh.work@gmail.com> |
| Wed, 04 Mar 2015 09:39:11 +0100 | |
| changeset 395 | 2e8c92eb0dfa |
| parent 316 | 242510015401 |
| permissions | -rw-r--r-- |
| 45 | 1 |
<?xml version="1.0" encoding="UTF-8"?> |
2 |
<beans xmlns="http://www.springframework.org/schema/beans" |
|
3 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
4 |
xmlns:context="http://www.springframework.org/schema/context" |
|
| 109 | 5 |
xmlns:util="http://www.springframework.org/schema/util" |
6 |
xmlns:mvc="http://www.springframework.org/schema/mvc" |
|
7 |
xsi:schemaLocation=" |
|
|
146
2f3ef07f3eef
add basic security for admin pages
ymh <ymh.work@gmail.com>
parents:
127
diff
changeset
|
8 |
http://www.springframework.org/schema/beans |
| 258 | 9 |
http://www.springframework.org/schema/beans/spring-beans.xsd |
| 45 | 10 |
http://www.springframework.org/schema/context |
| 258 | 11 |
http://www.springframework.org/schema/context/spring-context.xsd |
| 109 | 12 |
http://www.springframework.org/schema/util |
| 258 | 13 |
http://www.springframework.org/schema/util/spring-util.xsd |
| 109 | 14 |
http://www.springframework.org/schema/mvc |
| 258 | 15 |
http://www.springframework.org/schema/mvc/spring-mvc.xsd" |
| 109 | 16 |
> |
| 258 | 17 |
|
18 |
<!-- Activates various annotations to be detected in bean classes --> |
|
19 |
<context:annotation-config /> |
|
20 |
<mvc:annotation-driven /> |
|
| 109 | 21 |
|
22 |
<util:properties id="propsLocations"> |
|
23 |
<prop key="servletContextProps">WEB-INF/renkan.properties</prop> |
|
24 |
<prop key="classpathProps">classpath:renkan_run.properties</prop> |
|
25 |
</util:properties> |
|
26 |
||
27 |
<!--context:property-placeholder order="1000" ignore-unresolvable="true" ignore-resource-not-found="false" location="${propsLocations.servletContextProps}"/> |
|
28 |
<context:property-placeholder order="1" ignore-unresolvable="true" ignore-resource-not-found="true" location="${propsLocations.classpathProps}"/--> |
|
29 |
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> |
|
30 |
<property name="order" value="1000"/> |
|
31 |
<property name="location" value="#{propsLocations.servletContextProps}"/> |
|
32 |
<property name="ignoreUnresolvablePlaceholders" value="true"/> |
|
33 |
<property name="IgnoreResourceNotFound" value="false"/> |
|
34 |
</bean> |
|
35 |
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> |
|
36 |
<property name="order" value="1"/> |
|
37 |
<property name="location" value="#{propsLocations.classpathProps}"/> |
|
38 |
<property name="ignoreUnresolvablePlaceholders" value="true"/> |
|
39 |
<property name="IgnoreResourceNotFound" value="true"/> |
|
40 |
</bean> |
|
41 |
|
|
42 |
<bean id="renkanProperties" class="org.springframework.beans.factory.config.PropertiesFactoryBean"> |
|
43 |
<property name="IgnoreResourceNotFound" value="true"/> |
|
44 |
<property name="locations"> |
|
45 |
<list> |
|
46 |
<value>#{propsLocations.servletContextProps}</value> |
|
47 |
<value>#{propsLocations.classpathProps}</value> |
|
48 |
</list> |
|
49 |
</property> |
|
50 |
<property name="fileEncoding" value="UTF-8"/> |
|
51 |
</bean> |
|
| 45 | 52 |
|
53 |
<!-- Configures the annotation-driven Spring MVC Controller programming model. |
|
54 |
Note that, with Spring 3.0, this tag works in Servlet MVC only! --> |
|
| 231 | 55 |
|
| 45 | 56 |
<!-- Loads MongoDB configuraton --> |
57 |
<import resource="mongo-config.xml"/> |
|
|
150
5b62100b8562
- replace simple http authentication by form auth
ymh <ymh.work@gmail.com>
parents:
146
diff
changeset
|
58 |
<import resource="spring-security.xml"/> |
| 45 | 59 |
|
60 |
<bean id="springConfigurer" |
|
61 |
class="org.iri_research.renkan.coweb.SpringConfigurer" |
|
62 |
factory-method="getInstance" /> |
|
|
106
d34e253f5c32
Simplify spring integration + correct key for collaborative usage
ymh <ymh.work@gmail.com>
parents:
87
diff
changeset
|
63 |
|
| 109 | 64 |
<bean class="org.iri_research.renkan.RenkanProperties" |
65 |
factory-method="getInstance" /> |
|
66 |
||
67 |
||
| 45 | 68 |
<!-- Scans the classpath for annotated components that will be auto-registered as Spring beans. |
69 |
For example @Controller and @Service. Make sure to set the correct base-package--> |
|
| 298 | 70 |
<context:component-scan base-package="org.iri_research.renkan.models" /> |
| 45 | 71 |
<context:component-scan base-package="org.iri_research.renkan.rest" /> |
72 |
<context:component-scan base-package="org.iri_research.renkan.coweb" /> |
|
| 215 | 73 |
<context:component-scan base-package="org.iri_research.renkan.management" /> |
| 109 | 74 |
|
75 |
<!--mvc:annotation-driven> |
|
76 |
<mvc:argument-resolvers> |
|
77 |
<bean class="org.springframework.data.web.PageableArgumentResolver"> |
|
78 |
<property name="fallbackPagable"> |
|
79 |
<bean class="org.springframework.data.domain.PageRequest"> |
|
80 |
<constructor-arg type="int" value="1"/> |
|
| 298 | 81 |
<constructor-arg type="int" value="${renkan.pagination.size}"/> |
| 109 | 82 |
</bean> |
83 |
</property> |
|
84 |
</bean> |
|
85 |
</mvc:argument-resolvers> |
|
86 |
</mvc:annotation-driven--> |
|
| 258 | 87 |
|
|
150
5b62100b8562
- replace simple http authentication by form auth
ymh <ymh.work@gmail.com>
parents:
146
diff
changeset
|
88 |
<bean class="org.springframework.context.support.ReloadableResourceBundleMessageSource" id="messageSource"> |
|
5b62100b8562
- replace simple http authentication by form auth
ymh <ymh.work@gmail.com>
parents:
146
diff
changeset
|
89 |
<property name="basenames"> |
|
5b62100b8562
- replace simple http authentication by form auth
ymh <ymh.work@gmail.com>
parents:
146
diff
changeset
|
90 |
<list> |
|
5b62100b8562
- replace simple http authentication by form auth
ymh <ymh.work@gmail.com>
parents:
146
diff
changeset
|
91 |
<value>WEB-INF/i18n/messages</value> |
|
5b62100b8562
- replace simple http authentication by form auth
ymh <ymh.work@gmail.com>
parents:
146
diff
changeset
|
92 |
<value>classpath:org/springframework/security/messages</value> |
|
5b62100b8562
- replace simple http authentication by form auth
ymh <ymh.work@gmail.com>
parents:
146
diff
changeset
|
93 |
</list> |
|
5b62100b8562
- replace simple http authentication by form auth
ymh <ymh.work@gmail.com>
parents:
146
diff
changeset
|
94 |
</property> |
|
5b62100b8562
- replace simple http authentication by form auth
ymh <ymh.work@gmail.com>
parents:
146
diff
changeset
|
95 |
<property name="defaultEncoding" value="UTF-8"/> |
|
232
b7000ff4989b
- Use Joda DateTime instead of java.utils.Date
ymh <ymh.work@gmail.com>
parents:
231
diff
changeset
|
96 |
<property name="fallbackToSystemLocale" value="true" /> |
|
150
5b62100b8562
- replace simple http authentication by form auth
ymh <ymh.work@gmail.com>
parents:
146
diff
changeset
|
97 |
</bean> |
| 45 | 98 |
|
99 |
</beans> |