|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | + |
| 3 | +<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 4 | + xmlns:security="http://www.springframework.org/schema/security" |
| 5 | + xmlns="http://www.springframework.org/schema/beans" |
| 6 | + xsi:schemaLocation=" |
| 7 | + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd |
| 8 | + http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd"> |
| 9 | + |
| 10 | + <!-- Use hibernate instead of the registry to store the job queue. configure the data source as well --> |
| 11 | + <bean id="jobQueue" class="org.mapfish.print.servlet.job.impl.hibernate.HibernateJobQueue"/> |
| 12 | + <bean id="mfDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"> |
| 13 | + <property name="driverClass" value="org.postgresql.Driver"/> |
| 14 | + <property name="jdbcUrl" value="jdbc:postgresql://${db.host}:${db.port:5432}/${db.name}"/> |
| 15 | + <property name="user" value="${db.username}"/> |
| 16 | + <property name="password" value="${db.password}"/> |
| 17 | + <property name="minPoolSize" value="1"/> |
| 18 | + <property name="numHelperThreads" value="1"/> |
| 19 | + <property name="maxIdleTime" value="30"/> |
| 20 | + </bean> |
| 21 | + |
| 22 | + <!-- Force the job manager the support clustering, by not taking submitted jobs automatically as its own. |
| 23 | + This mode requires the hibernate job queue, the registry job queue is unsupported. |
| 24 | + oldFileCleanUp should be turned off if hibernate is used for print job results (see below) --> |
| 25 | + <bean class="org.springframework.beans.factory.config.PropertyOverrideConfigurer"> |
| 26 | + <property name="ignoreResourceNotFound" value="true"/> |
| 27 | + <property name="properties"> |
| 28 | + <props> |
| 29 | + <prop key="jobManager.clustered">true</prop> |
| 30 | + <prop key="jobManager.oldFileCleanUp">false</prop> |
| 31 | + </props> |
| 32 | + </property> |
| 33 | + </bean> |
| 34 | + |
| 35 | + <!-- Use hibernate to read and write print job results --> |
| 36 | + <bean id="printJobPrototype" class="org.mapfish.print.servlet.job.impl.hibernate.HibernatePrintJob" |
| 37 | + scope="prototype"/> |
| 38 | + <bean id="fileReportLoader" class="org.mapfish.print.servlet.job.impl.hibernate.HibernateReportLoader"/> |
| 39 | + <bean id="accounting" class="org.mapfish.print.servlet.job.HibernateAccounting" lazy-init="false"/> |
| 40 | + |
| 41 | + <bean name="bcryptEncoder" |
| 42 | + class="org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder"/> |
| 43 | + |
| 44 | + <security:authentication-manager alias="authenticationManager"> |
| 45 | + <security:authentication-provider> |
| 46 | + <security:password-encoder ref="bcryptEncoder"/> |
| 47 | + <security:user-service> |
| 48 | + <!-- password is jimi --> |
| 49 | + <security:user name="jimi" |
| 50 | + password="$2a$10$OeKmMfVmL2IbF/3skK8l2.Gl3EqvvGhb.Pxr/K0dN7.ttPRHsOzVW" |
| 51 | + authorities="ROLE_USER, ROLE_ADMIN"/> |
| 52 | + <!-- password is bob --> |
| 53 | + <security:user name="bob" |
| 54 | + password="$2a$10$D5gwUewQQSpjfZPTcj9rpuTTfmxAqNEyJ19pzC7Z9.fHSCl3jtDj." |
| 55 | + authorities="ROLE_USER"/> |
| 56 | + </security:user-service> |
| 57 | + </security:authentication-provider> |
| 58 | + </security:authentication-manager> |
| 59 | +</beans> |
0 commit comments