| author | veltr |
| Tue, 14 May 2013 12:15:15 +0200 | |
| changeset 175 | f636e2dcfb2c |
| parent 150 | 5b62100b8562 |
| child 225 | 0fcce86e650c |
| permissions | -rw-r--r-- |
| 146 | 1 |
<beans xmlns="http://www.springframework.org/schema/beans" |
2 |
xmlns:security="http://www.springframework.org/schema/security" |
|
3 |
xmlns:util="http://www.springframework.org/schema/util" |
|
4 |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
|
5 |
xsi:schemaLocation=" |
|
6 |
http://www.springframework.org/schema/beans |
|
7 |
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd |
|
8 |
http://www.springframework.org/schema/security |
|
9 |
http://www.springframework.org/schema/security/spring-security-3.1.xsd |
|
10 |
http://www.springframework.org/schema/util |
|
11 |
http://www.springframework.org/schema/util/spring-util-3.0.xsd" |
|
12 |
> |
|
13 |
||
|
149
554a7b55c29a
Simplify, put everythong in the same property file
ymh <ymh.work@gmail.com>
parents:
146
diff
changeset
|
14 |
<util:properties id="propsLocations"> |
|
554a7b55c29a
Simplify, put everythong in the same property file
ymh <ymh.work@gmail.com>
parents:
146
diff
changeset
|
15 |
<prop key="servletContextProps">WEB-INF/renkan.properties</prop> |
|
554a7b55c29a
Simplify, put everythong in the same property file
ymh <ymh.work@gmail.com>
parents:
146
diff
changeset
|
16 |
<prop key="classpathProps">classpath:renkan_run.properties</prop> |
| 146 | 17 |
</util:properties> |
18 |
|
|
19 |
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> |
|
20 |
<property name="order" value="1000"/> |
|
|
149
554a7b55c29a
Simplify, put everythong in the same property file
ymh <ymh.work@gmail.com>
parents:
146
diff
changeset
|
21 |
<property name="location" value="#{propsLocations.servletContextProps}"/> |
| 146 | 22 |
<property name="ignoreUnresolvablePlaceholders" value="true"/> |
23 |
<property name="IgnoreResourceNotFound" value="false"/> |
|
24 |
</bean> |
|
25 |
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> |
|
26 |
<property name="order" value="1"/> |
|
|
149
554a7b55c29a
Simplify, put everythong in the same property file
ymh <ymh.work@gmail.com>
parents:
146
diff
changeset
|
27 |
<property name="location" value="#{propsLocations.classpathProps}"/> |
| 146 | 28 |
<property name="ignoreUnresolvablePlaceholders" value="true"/> |
29 |
<property name="IgnoreResourceNotFound" value="true"/> |
|
30 |
</bean> |
|
31 |
|
|
|
150
5b62100b8562
- replace simple http authentication by form auth
ymh <ymh.work@gmail.com>
parents:
149
diff
changeset
|
32 |
<security:http auto-config="true" use-expressions="true"> |
|
5b62100b8562
- replace simple http authentication by form auth
ymh <ymh.work@gmail.com>
parents:
149
diff
changeset
|
33 |
<security:intercept-url pattern="/admin" access="hasRole('ROLE_ADMIN')" /> |
|
5b62100b8562
- replace simple http authentication by form auth
ymh <ymh.work@gmail.com>
parents:
149
diff
changeset
|
34 |
<security:intercept-url pattern="/admin/*" access="hasRole('ROLE_ADMIN')" /> |
|
5b62100b8562
- replace simple http authentication by form auth
ymh <ymh.work@gmail.com>
parents:
149
diff
changeset
|
35 |
<security:form-login login-page="/auth/login" authentication-failure-url="/auth/loginfailed" password-parameter="password" username-parameter="username" /> |
|
5b62100b8562
- replace simple http authentication by form auth
ymh <ymh.work@gmail.com>
parents:
149
diff
changeset
|
36 |
<security:logout /> |
| 146 | 37 |
</security:http> |
38 |
|
|
39 |
<security:authentication-manager> |
|
40 |
<security:authentication-provider> |
|
41 |
<security:password-encoder hash="sha-256"/> |
|
42 |
<security:user-service> |
|
43 |
<security:user name="${user.admin.name}" password="${user.admin.password}" authorities="ROLE_ADMIN, ROLE_USER"/> |
|
44 |
</security:user-service> |
|
45 |
</security:authentication-provider> |
|
46 |
</security:authentication-manager> |
|
47 |
|
|
48 |
</beans> |