blob: d0c3576fa16c084195ea28169d1bbb831e8bd258 [file] [log] [blame]
Michael Hanlca740d72015-06-16 10:04:58 +02001<?xml version="1.0" encoding="UTF-8"?>
2<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
margaretha0e8f4e72018-04-05 14:11:52 +02003 xmlns:p="http://www.springframework.org/schema/p" xmlns:util="http://www.springframework.org/schema/util"
4 xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
5 xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context"
margaretha543f2002017-07-14 00:27:15 +02006 xmlns:cache="http://www.springframework.org/schema/cache"
7 xsi:schemaLocation="http://www.springframework.org/schema/beans
margaretha3da7cd32018-10-22 17:42:52 +02008 http://www.springframework.org/schema/beans/spring-beans.xsd
margaretha543f2002017-07-14 00:27:15 +02009 http://www.springframework.org/schema/tx
margaretha3da7cd32018-10-22 17:42:52 +020010 http://www.springframework.org/schema/tx/spring-tx.xsd
margaretha543f2002017-07-14 00:27:15 +020011 http://www.springframework.org/schema/aop
margaretha3da7cd32018-10-22 17:42:52 +020012 http://www.springframework.org/schema/aop/spring-aop.xsd
margaretha543f2002017-07-14 00:27:15 +020013 http://www.springframework.org/schema/context
margaretha3da7cd32018-10-22 17:42:52 +020014 http://www.springframework.org/schema/context/spring-context.xsd
margaretha543f2002017-07-14 00:27:15 +020015 http://www.springframework.org/schema/util
margaretha3da7cd32018-10-22 17:42:52 +020016 http://www.springframework.org/schema/util/spring-util.xsd">
margaretha543f2002017-07-14 00:27:15 +020017
18 <context:component-scan base-package="de.ids_mannheim.korap" />
19 <context:annotation-config />
20
21 <bean id="props"
22 class="org.springframework.beans.factory.config.PropertiesFactoryBean">
23 <property name="ignoreResourceNotFound" value="true" />
24 <property name="locations">
25 <array>
26 <value>classpath:kustvakt.conf</value>
27 <value>file:./kustvakt.conf</value>
28 </array>
29 </property>
30 </bean>
31
32 <bean id="placeholders"
33 class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer">
34 <property name="ignoreResourceNotFound" value="true" />
35 <property name="locations">
36 <array>
margarethaaecee1b2018-02-20 14:44:21 +010037 <value>classpath:properties/jdbc.properties</value>
margarethaea68a0a2017-09-21 03:09:49 +020038 <value>file:./jdbc.properties</value>
margarethaaecee1b2018-02-20 14:44:21 +010039 <value>classpath:properties/mail.properties</value>
40 <value>file:./mail.properties</value>
margarethae72355a2018-11-28 16:53:09 +010041 <value>classpath:hibernate.properties</value>
margaretha0e8f4e72018-04-05 14:11:52 +020042
margarethaade7d4a2017-07-20 19:53:35 +020043 <value>classpath:kustvakt.conf</value>
margaretha14503cd2017-09-08 15:35:24 +020044 <value>file:./kustvakt.conf</value>
margaretha543f2002017-07-14 00:27:15 +020045 </array>
46 </property>
47 </bean>
48
49 <bean id='cacheManager' class='org.springframework.cache.ehcache.EhCacheCacheManager'
50 p:cacheManager-ref='ehcache' />
51
52 <bean id='ehcache'
53 class='org.springframework.cache.ehcache.EhCacheManagerFactoryBean'
54 p:configLocation='classpath:ehcache.xml' p:shared='true' />
55
margaretha543f2002017-07-14 00:27:15 +020056 <!--class="org.apache.commons.dbcp2.BasicDataSource" -->
57 <!-- org.springframework.jdbc.datasource.SingleConnectionDataSource -->
58 <bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource"
59 lazy-init="true">
60 <property name="driverClassName" value="${jdbc.driverClassName}" />
61 <property name="url" value="${jdbc.url}" />
62 <property name="username" value="${jdbc.username}" />
63 <property name="password" value="${jdbc.password}" />
64 <!-- relevant for single connection datasource and sqlite -->
65 <!-- <property name="suppressClose"> <value>true</value> </property> -->
66 <!--<property name="initialSize" value="2"/> -->
67 <property name="maxTotal" value="4" />
68 <property name="maxIdle" value="2" />
69 <property name="minIdle" value="1" />
margaretha45211af2018-08-28 12:49:07 +020070 <property name="maxWaitMillis" value="-1" />
margaretha543f2002017-07-14 00:27:15 +020071 <!--<property name="poolPreparedStatements" value="true"/> -->
72 </bean>
margaretha45211af2018-08-28 12:49:07 +020073
74 <bean id="c3p0DataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"
75 destroy-method="close" lazy-init="true">
76 <property name="driverClass" value="${jdbc.driverClassName}" />
77 <property name="jdbcUrl" value="${jdbc.url}" />
78 <property name="user" value="${jdbc.username}" />
79 <property name="password" value="${jdbc.password}" />
80 <property name="maxPoolSize" value="4" />
81 <property name="minPoolSize" value="1" />
82 <property name="maxStatements" value="100" />
83 <!-- <property name="testConnectionOnCheckOut" value="true" /> -->
84 <property name="idleConnectionTestPeriod" value="60" />
85 <property name="testConnectionOnCheckin" value="true" />
86 </bean>
margaretha543f2002017-07-14 00:27:15 +020087
88 <bean id="sqliteDataSource"
89 class="org.springframework.jdbc.datasource.SingleConnectionDataSource"
90 lazy-init="true">
91 <property name="driverClassName" value="${jdbc.driverClassName}" />
92 <property name="url" value="${jdbc.url}" />
93 <property name="username" value="${jdbc.username}" />
94 <property name="password" value="${jdbc.password}" />
margarethae6c711b2018-02-06 21:55:04 +010095 <property name="connectionProperties">
margaretha0e8f4e72018-04-05 14:11:52 +020096 <props>
97 <prop key="date_string_format">yyyy-MM-dd HH:mm:ss</prop>
98 </props>
99 </property>
100
margaretha543f2002017-07-14 00:27:15 +0200101 <!-- relevant for single connection datasource and sqlite -->
102 <property name="suppressClose">
103 <value>true</value>
104 </property>
105 <!--<property name="initialSize" value="2"/> -->
106 <!--<property name="poolPreparedStatements" value="true"/> -->
107 </bean>
108
109 <!-- to configure database for sqlite, mysql, etc. migrations -->
110 <bean id="flyway" class="org.flywaydb.core.Flyway" init-method="migrate">
margarethaf6d5a822017-10-19 19:51:20 +0200111 <property name="baselineOnMigrate" value="true" />
margarethaecbe72d2017-07-26 17:13:32 +0200112 <!-- <property name="validateOnMigrate" value="false" /> -->
113 <!-- <property name="cleanOnValidationError" value="true" /> -->
margaretha543f2002017-07-14 00:27:15 +0200114 <property name="locations" value="${jdbc.schemaPath}" />
margaretha894a7d72017-11-08 19:24:20 +0100115 <!-- <property name="dataSource" ref="dataSource" /> -->
margaretha8514d782018-08-28 17:36:56 +0200116 <property name="dataSource" ref="sqliteDataSource" />
117 <!-- <property name="dataSource" ref="c3p0DataSource" /> -->
margaretha45211af2018-08-28 12:49:07 +0200118
margaretha543f2002017-07-14 00:27:15 +0200119 </bean>
margaretha0e8f4e72018-04-05 14:11:52 +0200120
121
margaretha543f2002017-07-14 00:27:15 +0200122 <bean id="kustvakt_db" class="de.ids_mannheim.korap.handlers.JDBCClient">
123 <constructor-arg index="0" ref="dataSource" />
124 <!-- deprecated property -->
125 <property name="database" value="${jdbc.database}" />
126 </bean>
127
128 <bean id="entityManagerFactory"
129 class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
margaretha894a7d72017-11-08 19:24:20 +0100130 <!-- <property name="dataSource" ref="dataSource" /> -->
margaretha8514d782018-08-28 17:36:56 +0200131 <property name="dataSource" ref="sqliteDataSource" />
132 <!-- <property name="dataSource" ref="c3p0DataSource" /> -->
margaretha0e8f4e72018-04-05 14:11:52 +0200133
margarethaa452c5e2018-04-25 22:48:09 +0200134 <property name="packagesToScan">
135 <array>
136 <value>de.ids_mannheim.korap.entity</value>
137 <value>de.ids_mannheim.korap.oauth2.entity</value>
138 </array>
139 </property>
margaretha543f2002017-07-14 00:27:15 +0200140 <property name="jpaVendorAdapter">
141 <bean id="jpaVendorAdapter"
142 class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
143 <property name="databasePlatform" value="${hibernate.dialect}" />
144 </bean>
145 </property>
146 <property name="jpaProperties">
147 <props>
148 <prop key="hibernate.dialect">${hibernate.dialect}</prop>
149 <prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>
150 <prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
151 <prop key="hibernate.cache.use_query_cache">${hibernate.cache.use_query_cache}</prop>
152 <prop key="hibernate.cache.use_second_level_cache">${hibernate.cache.use_second_level_cache}
153 </prop>
154 <prop key="hibernate.cache.provider_class">${hibernate.cache.provider}</prop>
155 <prop key="hibernate.cache.region.factory_class">${hibernate.cache.region.factory}</prop>
margaretha6ad08b42018-08-22 18:33:54 +0200156 <prop key="hibernate.jdbc.time_zone">${hibernate.jdbc.time_zone}</prop>
margaretha543f2002017-07-14 00:27:15 +0200157 </props>
158 </property>
159 </bean>
160
161 <tx:annotation-driven proxy-target-class="true"
162 transaction-manager="transactionManager" />
margaretha0e8f4e72018-04-05 14:11:52 +0200163
margaretha543f2002017-07-14 00:27:15 +0200164 <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
165 <property name="entityManagerFactory" ref="entityManagerFactory" />
166 </bean>
167
168 <bean id="transactionTemplate"
169 class="org.springframework.transaction.support.TransactionTemplate">
170 <constructor-arg ref="transactionManager" />
171 </bean>
172
margarethaade7d4a2017-07-20 19:53:35 +0200173 <!-- Data access objects -->
margaretha34954472018-10-24 20:05:17 +0200174 <bean id="adminDao" class="de.ids_mannheim.korap.dao.AdminDaoImpl" />
margaretha0e8f4e72018-04-05 14:11:52 +0200175 <bean id="resourceDao" class="de.ids_mannheim.korap.dao.ResourceDao" />
margarethab4ce6602018-04-26 20:23:57 +0200176 <bean id="accessScopeDao" class="de.ids_mannheim.korap.oauth2.dao.AccessScopeDao" />
margaretha34954472018-10-24 20:05:17 +0200177 <bean id="authorizationDao" class="de.ids_mannheim.korap.oauth2.dao.CachedAuthorizationDaoImpl" />
margarethab4ce6602018-04-26 20:23:57 +0200178
margaretha34954472018-10-24 20:05:17 +0200179 <!-- Filters -->
180 <!-- <bean id="authenticationFilter" class="de.ids_mannheim.korap.web.filter.AuthenticationFilter" >
181 <property name="authenticationManager" ref="kustvakt_authenticationmanager"/>
182 </bean>
183 <bean id="piwikFilter" class="de.ids_mannheim.korap.web.filter.PiwikFilter" >
184 <property name="authenticationManager" ref="kustvakt_authenticationmanager"/>
185 </bean> -->
186
187 <!-- Services -->
188 <bean id="scopeService" class="de.ids_mannheim.korap.oauth2.service.OAuth2ScopeServiceImpl" />
189
margarethab4ce6602018-04-26 20:23:57 +0200190 <!-- props are injected from default-config.xml -->
191 <bean id="kustvakt_config" class="de.ids_mannheim.korap.config.FullConfiguration">
192 <constructor-arg name="properties" ref="props" />
193 </bean>
194
margaretha34954472018-10-24 20:05:17 +0200195 <bean id="initializator" class="de.ids_mannheim.de.init.InitializatorImpl"
margaretha2c50c732018-10-17 18:48:52 +0200196 init-method="initAnnotation">
margarethab4ce6602018-04-26 20:23:57 +0200197 </bean>
margarethaade7d4a2017-07-20 19:53:35 +0200198
199 <!-- Krill -->
200 <bean id="search_krill" class="de.ids_mannheim.korap.web.SearchKrill">
margaretha0e8f4e72018-04-05 14:11:52 +0200201 <constructor-arg value="${krill.indexDir}" />
margaretha543f2002017-07-14 00:27:15 +0200202 </bean>
203
margaretha31a9f522018-04-03 20:40:45 +0200204 <!-- URLValidator -->
margarethae4034a82018-07-02 14:46:59 +0200205 <bean id="redirectURIValidator" class="org.apache.commons.validator.routines.UrlValidator">
206 <constructor-arg value="http,https" index="0" />
207 <constructor-arg index="1" type="long">
208 <util:constant
209 static-field="org.apache.commons.validator.routines.UrlValidator.NO_FRAGMENTS" />
210 </constructor-arg>
margarethaa0486272018-04-12 19:59:31 +0200211 </bean>
margarethad7cab212018-07-02 19:01:43 +0200212 <bean id="urlValidator" class="org.apache.commons.validator.routines.UrlValidator">
213 <constructor-arg value="http,https" />
214 </bean>
215
margaretha34954472018-10-24 20:05:17 +0200216 <!-- Rewrite -->
217 <bean id="rewriteHandler" class="de.ids_mannheim.korap.rewrite.FullRewriteHandler">
margaretha56e8e552017-12-05 16:31:21 +0100218 <constructor-arg ref="kustvakt_config" />
219 </bean>
220
margaretha543f2002017-07-14 00:27:15 +0200221 <bean id="kustvakt_auditing" class="de.ids_mannheim.korap.handlers.JDBCAuditing">
222 <constructor-arg ref="kustvakt_db" />
223 </bean>
224
margarethad7cab212018-07-02 19:01:43 +0200225 <bean id="kustvaktResponseHandler" class="de.ids_mannheim.korap.web.KustvaktResponseHandler">
margaretha0e8f4e72018-04-05 14:11:52 +0200226 <constructor-arg index="0" name="iface" ref="kustvakt_auditing" />
227 </bean>
margarethaa452c5e2018-04-25 22:48:09 +0200228
margarethafb027f92018-04-23 20:00:13 +0200229 <!-- OAuth -->
230 <bean id="oauth2ResponseHandler" class="de.ids_mannheim.korap.web.OAuth2ResponseHandler">
margaretha05122312018-04-16 15:01:34 +0200231 <constructor-arg index="0" name="iface" ref="kustvakt_auditing" />
232 </bean>
margarethaa452c5e2018-04-25 22:48:09 +0200233
margarethafb027f92018-04-23 20:00:13 +0200234 <bean id="mdGenerator" class="org.apache.oltu.oauth2.as.issuer.MD5Generator">
235 </bean>
236 <bean id="oauthIssuer" class="org.apache.oltu.oauth2.as.issuer.OAuthIssuerImpl">
237 <constructor-arg index="0" ref="mdGenerator" />
238 </bean>
margaretha0e8f4e72018-04-05 14:11:52 +0200239
margaretha543f2002017-07-14 00:27:15 +0200240 <bean id="kustvakt_userdb" class="de.ids_mannheim.korap.handlers.EntityDao">
241 <constructor-arg ref="kustvakt_db" />
242 </bean>
243
margaretha543f2002017-07-14 00:27:15 +0200244 <bean id="document_provider" class="de.ids_mannheim.korap.handlers.DocumentDao">
245 <constructor-arg ref="kustvakt_db" />
246 </bean>
247
margarethaa452c5e2018-04-25 22:48:09 +0200248 <bean name="kustvakt_encryption" class="de.ids_mannheim.korap.encryption.KustvaktEncryption">
margaretha543f2002017-07-14 00:27:15 +0200249 <constructor-arg ref="kustvakt_config" />
250 </bean>
251
252 <!-- authentication providers to use -->
margaretha0e8f4e72018-04-05 14:11:52 +0200253 <!-- <bean id="api_auth" class="de.ids_mannheim.korap.authentication.APIAuthentication">
254 <constructor-arg type="de.ids_mannheim.korap.config.KustvaktConfiguration"
255 ref="kustvakt_config" /> </bean> -->
256
margaretha4de41192017-11-15 11:47:11 +0100257 <bean id="ldap_auth" class="de.ids_mannheim.korap.authentication.LdapAuth3">
margaretha543f2002017-07-14 00:27:15 +0200258 <constructor-arg type="de.ids_mannheim.korap.config.KustvaktConfiguration"
259 ref="kustvakt_config" />
260 </bean>
261
margaretha6ef00dd2018-09-12 14:06:38 +0200262 <!-- <bean id="openid_auth"
margaretha139d0f72017-11-14 18:56:22 +0100263 class="de.ids_mannheim.korap.authentication.OpenIDconnectAuthentication">
margaretha543f2002017-07-14 00:27:15 +0200264 <constructor-arg type="de.ids_mannheim.korap.config.KustvaktConfiguration"
265 ref="kustvakt_config" />
266 <constructor-arg
267 type="de.ids_mannheim.korap.interfaces.db.PersistenceClient" ref="kustvakt_db" />
margaretha6ef00dd2018-09-12 14:06:38 +0200268 </bean> -->
margaretha543f2002017-07-14 00:27:15 +0200269
margaretha543f2002017-07-14 00:27:15 +0200270 <bean id="session_auth"
margaretha139d0f72017-11-14 18:56:22 +0100271 class="de.ids_mannheim.korap.authentication.SessionAuthentication">
margaretha543f2002017-07-14 00:27:15 +0200272 <constructor-arg type="de.ids_mannheim.korap.config.KustvaktConfiguration"
273 ref="kustvakt_config" />
274 <constructor-arg type="de.ids_mannheim.korap.interfaces.EncryptionIface"
275 ref="kustvakt_encryption" />
276 </bean>
Michael Hanlca740d72015-06-16 10:04:58 +0200277
margarethacf306d32018-05-30 19:45:35 +0200278 <bean id="oauth2_auth"
279 class="de.ids_mannheim.korap.authentication.OAuth2Authentication" />
280
margaretha543f2002017-07-14 00:27:15 +0200281 <util:list id="kustvakt_authproviders"
282 value-type="de.ids_mannheim.korap.interfaces.AuthenticationIface">
margaretha4de41192017-11-15 11:47:11 +0100283 <ref bean="ldap_auth" />
margaretha543f2002017-07-14 00:27:15 +0200284 <ref bean="session_auth" />
margaretha4de41192017-11-15 11:47:11 +0100285 <!-- <ref bean="api_auth" /> -->
margaretha6ef00dd2018-09-12 14:06:38 +0200286 <!-- <ref bean="openid_auth" /> -->
margarethacf306d32018-05-30 19:45:35 +0200287 <ref bean="oauth2_auth" />
margaretha543f2002017-07-14 00:27:15 +0200288 </util:list>
Michael Hanl72c7b832015-09-03 08:42:15 +0200289
290
margaretha543f2002017-07-14 00:27:15 +0200291 <bean id="userdata_details" class="de.ids_mannheim.korap.handlers.UserDetailsDao">
292 <constructor-arg ref="kustvakt_db" />
293 </bean>
Michael Hanl72c7b832015-09-03 08:42:15 +0200294
margaretha543f2002017-07-14 00:27:15 +0200295 <bean id="userdata_settings" class="de.ids_mannheim.korap.handlers.UserSettingsDao">
296 <constructor-arg ref="kustvakt_db" />
297 </bean>
298
299 <util:list id="kustvakt_userdata"
300 value-type="de.ids_mannheim.korap.interfaces.db.UserdataDbIface">
301 <ref bean="userdata_details" />
302 <ref bean="userdata_settings" />
303 </util:list>
Michael Hanl72c7b832015-09-03 08:42:15 +0200304
Michael Hanldaf86602016-05-12 14:31:52 +0200305
margaretha543f2002017-07-14 00:27:15 +0200306 <util:list id="kustvakt_resources"
307 value-type="de.ids_mannheim.korap.interfaces.db.ResourceOperationIface">
308 <ref bean="document_provider" />
margaretha543f2002017-07-14 00:27:15 +0200309 </util:list>
Michael Hanlf8fcc7a2016-06-03 17:41:07 +0200310
margaretha543f2002017-07-14 00:27:15 +0200311 <!-- specify type for constructor argument -->
margaretha34954472018-10-24 20:05:17 +0200312 <bean id="authenticationManager"
margaretha139d0f72017-11-14 18:56:22 +0100313 class="de.ids_mannheim.korap.authentication.KustvaktAuthenticationManager">
margaretha0e8f4e72018-04-05 14:11:52 +0200314 <constructor-arg type="de.ids_mannheim.korap.interfaces.EntityHandlerIface"
315 ref="kustvakt_userdb" />
margaretha543f2002017-07-14 00:27:15 +0200316 <constructor-arg type="de.ids_mannheim.korap.interfaces.EncryptionIface"
317 ref="kustvakt_encryption" />
318 <constructor-arg ref="kustvakt_config" />
319 <constructor-arg type="de.ids_mannheim.korap.interfaces.db.AuditingIface"
320 ref="kustvakt_auditing" />
321 <constructor-arg ref="kustvakt_userdata" />
322 <!-- inject authentication providers to use -->
323 <property name="providers" ref="kustvakt_authproviders" />
324 </bean>
margaretha34954472018-10-24 20:05:17 +0200325
margaretha543f2002017-07-14 00:27:15 +0200326 <!-- todo: if db interfaces not loaded via spring, does transaction even
327 work then? -->
328 <!-- the transactional advice (i.e. what 'happens'; see the <aop:advisor/>
329 bean below) -->
330 <tx:advice id="txAdvice" transaction-manager="txManager">
331 <!-- the transactional semantics... -->
332 <tx:attributes>
333 <!-- all methods starting with 'get' are read-only -->
334 <tx:method name="get*" read-only="true" rollback-for="KorAPException" />
335 <!-- other methods use the default transaction settings (see below) -->
336 <tx:method name="*" rollback-for="KorAPException" />
337 </tx:attributes>
338 </tx:advice>
Michael Hanldaf86602016-05-12 14:31:52 +0200339
margaretha543f2002017-07-14 00:27:15 +0200340 <!-- ensure that the above transactional advice runs for any execution of
341 an operation defined by the service interface -->
342 <aop:config>
343 <aop:pointcut id="service"
344 expression="execution(* de.ids_mannheim.korap.interfaces.db.*.*(..))" />
345 <aop:advisor advice-ref="txAdvice" pointcut-ref="service" />
346 </aop:config>
Michael Hanlf8fcc7a2016-06-03 17:41:07 +0200347
margaretha543f2002017-07-14 00:27:15 +0200348 <!-- similarly, don't forget the PlatformTransactionManager -->
349 <bean id="txManager"
350 class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
margaretha894a7d72017-11-08 19:24:20 +0100351 <!-- <property name="dataSource" ref="dataSource" /> -->
margaretha8514d782018-08-28 17:36:56 +0200352 <property name="dataSource" ref="sqliteDataSource" />
353 <!-- <property name="dataSource" ref="c3p0DataSource" /> -->
margaretha543f2002017-07-14 00:27:15 +0200354 </bean>
margaretha0e8f4e72018-04-05 14:11:52 +0200355
margarethac9f1dfa2018-02-07 17:50:33 +0100356 <!-- mail -->
margaretha0e8f4e72018-04-05 14:11:52 +0200357 <bean id="authenticator" class="de.ids_mannheim.korap.service.MailAuthenticator">
358 <constructor-arg index="0" value="${mail.username}" />
359 <constructor-arg index="1" value="${mail.password}" />
margarethaaecee1b2018-02-20 14:44:21 +0100360 </bean>
361 <bean id="smtpSession" class="javax.mail.Session" factory-method="getInstance">
362 <constructor-arg index="0">
363 <props>
364 <prop key="mail.smtp.submitter">${mail.username}</prop>
365 <prop key="mail.smtp.auth">${mail.auth}</prop>
366 <prop key="mail.smtp.host">${mail.host}</prop>
367 <prop key="mail.smtp.port">${mail.port}</prop>
368 <prop key="mail.smtp.starttls.enable">${mail.starttls.enable}</prop>
369 <prop key="mail.smtp.connectiontimeout">${mail.connectiontimeout}</prop>
370 </props>
371 </constructor-arg>
margaretha0e8f4e72018-04-05 14:11:52 +0200372 <constructor-arg index="1" ref="authenticator" />
margarethac9f1dfa2018-02-07 17:50:33 +0100373 </bean>
374 <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
margarethaaecee1b2018-02-20 14:44:21 +0100375 <property name="username" value="${mail.username}" />
margaretha0e8f4e72018-04-05 14:11:52 +0200376 <property name="password" value="${mail.password}" />
margarethac9f1dfa2018-02-07 17:50:33 +0100377 <property name="session" ref="smtpSession" />
378 </bean>
379 <bean id="velocityEngine" class="org.apache.velocity.app.VelocityEngine">
380 <constructor-arg index="0">
381 <props>
382 <prop key="resource.loader">class</prop>
margaretha0e8f4e72018-04-05 14:11:52 +0200383 <prop key="class.resource.loader.class">org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
384 </prop>
margarethac9f1dfa2018-02-07 17:50:33 +0100385 </props>
386 </constructor-arg>
margarethaaecee1b2018-02-20 14:44:21 +0100387 </bean>
Michael Hanlca740d72015-06-16 10:04:58 +0200388</beans>