Michael Hanl | ca740d7 | 2015-06-16 10:04:58 +0200 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
margaretha | 14503cd | 2017-09-08 15:35:24 +0200 | [diff] [blame] | 3 | xmlns:p="http://www.springframework.org/schema/p" |
| 4 | xmlns:util="http://www.springframework.org/schema/util" |
| 5 | xmlns:aop="http://www.springframework.org/schema/aop" |
| 6 | xmlns:tx="http://www.springframework.org/schema/tx" |
| 7 | xmlns="http://www.springframework.org/schema/beans" |
| 8 | xmlns:context="http://www.springframework.org/schema/context" |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 9 | xmlns:cache="http://www.springframework.org/schema/cache" |
| 10 | xsi:schemaLocation="http://www.springframework.org/schema/beans |
| 11 | http://www.springframework.org/schema/beans/spring-beans-4.0.xsd |
| 12 | http://www.springframework.org/schema/tx |
| 13 | http://www.springframework.org/schema/tx/spring-tx-4.0.xsd |
| 14 | http://www.springframework.org/schema/aop |
| 15 | http://www.springframework.org/schema/aop/spring-aop-4.0.xsd |
| 16 | http://www.springframework.org/schema/context |
| 17 | http://www.springframework.org/schema/context/spring-context-4.0.xsd |
| 18 | http://www.springframework.org/schema/util |
| 19 | http://www.springframework.org/schema/util/spring-util-4.0.xsd"> |
| 20 | |
| 21 | <context:component-scan base-package="de.ids_mannheim.korap" /> |
| 22 | <context:annotation-config /> |
| 23 | |
margaretha | ade7d4a | 2017-07-20 19:53:35 +0200 | [diff] [blame] | 24 | <!-- <bean id="test" class="de.ids_mannheim.korap.web.Test"> |
| 25 | <property name="config" ref="kustvakt_config" /> |
| 26 | </bean> --> |
| 27 | |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 28 | <bean id="props" |
| 29 | class="org.springframework.beans.factory.config.PropertiesFactoryBean"> |
| 30 | <property name="ignoreResourceNotFound" value="true" /> |
| 31 | <property name="locations"> |
| 32 | <array> |
| 33 | <value>classpath:kustvakt.conf</value> |
| 34 | <value>file:./kustvakt.conf</value> |
| 35 | </array> |
| 36 | </property> |
| 37 | </bean> |
| 38 | |
| 39 | <bean id="placeholders" |
| 40 | class="org.springframework.context.support.PropertySourcesPlaceholderConfigurer"> |
| 41 | <property name="ignoreResourceNotFound" value="true" /> |
| 42 | <property name="locations"> |
| 43 | <array> |
margaretha | aecee1b | 2018-02-20 14:44:21 +0100 | [diff] [blame] | 44 | <value>classpath:properties/jdbc.properties</value> |
margaretha | ea68a0a | 2017-09-21 03:09:49 +0200 | [diff] [blame] | 45 | <value>file:./jdbc.properties</value> |
margaretha | aecee1b | 2018-02-20 14:44:21 +0100 | [diff] [blame] | 46 | <value>classpath:properties/mail.properties</value> |
| 47 | <value>file:./mail.properties</value> |
| 48 | <value>classpath:properties/hibernate.properties</value> |
| 49 | |
margaretha | ade7d4a | 2017-07-20 19:53:35 +0200 | [diff] [blame] | 50 | <value>classpath:kustvakt.conf</value> |
margaretha | 14503cd | 2017-09-08 15:35:24 +0200 | [diff] [blame] | 51 | <value>file:./kustvakt.conf</value> |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 52 | </array> |
| 53 | </property> |
| 54 | </bean> |
| 55 | |
| 56 | <bean id='cacheManager' class='org.springframework.cache.ehcache.EhCacheCacheManager' |
| 57 | p:cacheManager-ref='ehcache' /> |
| 58 | |
| 59 | <bean id='ehcache' |
| 60 | class='org.springframework.cache.ehcache.EhCacheManagerFactoryBean' |
| 61 | p:configLocation='classpath:ehcache.xml' p:shared='true' /> |
| 62 | |
| 63 | <!-- props are injected from default-config.xml --> |
margaretha | 56e8e55 | 2017-12-05 16:31:21 +0100 | [diff] [blame] | 64 | <bean id="kustvakt_config" class="de.ids_mannheim.korap.config.FullConfiguration"> |
margaretha | f68daa6 | 2017-09-21 02:11:24 +0200 | [diff] [blame] | 65 | <constructor-arg name="properties" ref="props" /> |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 66 | </bean> |
| 67 | |
| 68 | <!--class="org.apache.commons.dbcp2.BasicDataSource" --> |
| 69 | <!-- org.springframework.jdbc.datasource.SingleConnectionDataSource --> |
| 70 | <bean id="dataSource" class="org.apache.commons.dbcp2.BasicDataSource" |
| 71 | lazy-init="true"> |
| 72 | <property name="driverClassName" value="${jdbc.driverClassName}" /> |
| 73 | <property name="url" value="${jdbc.url}" /> |
| 74 | <property name="username" value="${jdbc.username}" /> |
| 75 | <property name="password" value="${jdbc.password}" /> |
| 76 | <!-- relevant for single connection datasource and sqlite --> |
| 77 | <!-- <property name="suppressClose"> <value>true</value> </property> --> |
| 78 | <!--<property name="initialSize" value="2"/> --> |
| 79 | <property name="maxTotal" value="4" /> |
| 80 | <property name="maxIdle" value="2" /> |
| 81 | <property name="minIdle" value="1" /> |
| 82 | <property name="maxWaitMillis" value="15000" /> |
| 83 | <!--<property name="poolPreparedStatements" value="true"/> --> |
| 84 | </bean> |
| 85 | |
| 86 | <bean id="sqliteDataSource" |
| 87 | class="org.springframework.jdbc.datasource.SingleConnectionDataSource" |
| 88 | lazy-init="true"> |
| 89 | <property name="driverClassName" value="${jdbc.driverClassName}" /> |
| 90 | <property name="url" value="${jdbc.url}" /> |
| 91 | <property name="username" value="${jdbc.username}" /> |
| 92 | <property name="password" value="${jdbc.password}" /> |
margaretha | e6c711b | 2018-02-06 21:55:04 +0100 | [diff] [blame] | 93 | <property name="connectionProperties"> |
| 94 | <props> |
| 95 | <prop key="date_string_format">yyyy-MM-dd HH:mm:ss</prop> |
| 96 | </props> |
| 97 | </property> |
| 98 | |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 99 | <!-- relevant for single connection datasource and sqlite --> |
| 100 | <property name="suppressClose"> |
| 101 | <value>true</value> |
| 102 | </property> |
| 103 | <!--<property name="initialSize" value="2"/> --> |
| 104 | <!--<property name="poolPreparedStatements" value="true"/> --> |
| 105 | </bean> |
| 106 | |
| 107 | <!-- to configure database for sqlite, mysql, etc. migrations --> |
| 108 | <bean id="flyway" class="org.flywaydb.core.Flyway" init-method="migrate"> |
margaretha | f6d5a82 | 2017-10-19 19:51:20 +0200 | [diff] [blame] | 109 | <property name="baselineOnMigrate" value="true" /> |
margaretha | ecbe72d | 2017-07-26 17:13:32 +0200 | [diff] [blame] | 110 | <!-- <property name="validateOnMigrate" value="false" /> --> |
| 111 | <!-- <property name="cleanOnValidationError" value="true" /> --> |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 112 | <property name="locations" value="${jdbc.schemaPath}" /> |
margaretha | 894a7d7 | 2017-11-08 19:24:20 +0100 | [diff] [blame] | 113 | <!-- <property name="dataSource" ref="dataSource" /> --> |
| 114 | <property name="dataSource" ref="sqliteDataSource" /> |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 115 | </bean> |
margaretha | f18298b | 2017-09-14 22:14:32 +0200 | [diff] [blame] | 116 | |
| 117 | |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 118 | <bean id="kustvakt_db" class="de.ids_mannheim.korap.handlers.JDBCClient"> |
| 119 | <constructor-arg index="0" ref="dataSource" /> |
| 120 | <!-- deprecated property --> |
| 121 | <property name="database" value="${jdbc.database}" /> |
| 122 | </bean> |
| 123 | |
| 124 | <bean id="entityManagerFactory" |
| 125 | class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> |
margaretha | 894a7d7 | 2017-11-08 19:24:20 +0100 | [diff] [blame] | 126 | <!-- <property name="dataSource" ref="dataSource" /> --> |
| 127 | <property name="dataSource" ref="sqliteDataSource" /> |
| 128 | |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 129 | <property name="packagesToScan" value="de.ids_mannheim.korap.entity" /> |
| 130 | <property name="jpaVendorAdapter"> |
| 131 | <bean id="jpaVendorAdapter" |
| 132 | class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> |
| 133 | <property name="databasePlatform" value="${hibernate.dialect}" /> |
| 134 | </bean> |
| 135 | </property> |
| 136 | <property name="jpaProperties"> |
| 137 | <props> |
| 138 | <prop key="hibernate.dialect">${hibernate.dialect}</prop> |
| 139 | <prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop> |
| 140 | <prop key="hibernate.show_sql">${hibernate.show_sql}</prop> |
| 141 | <prop key="hibernate.cache.use_query_cache">${hibernate.cache.use_query_cache}</prop> |
| 142 | <prop key="hibernate.cache.use_second_level_cache">${hibernate.cache.use_second_level_cache} |
| 143 | </prop> |
| 144 | <prop key="hibernate.cache.provider_class">${hibernate.cache.provider}</prop> |
| 145 | <prop key="hibernate.cache.region.factory_class">${hibernate.cache.region.factory}</prop> |
| 146 | <!-- <prop key="net.sf.ehcache.configurationResourceName">classpath:ehcache.xml</prop> --> |
| 147 | </props> |
| 148 | </property> |
| 149 | </bean> |
| 150 | |
| 151 | <tx:annotation-driven proxy-target-class="true" |
| 152 | transaction-manager="transactionManager" /> |
margaretha | 894a7d7 | 2017-11-08 19:24:20 +0100 | [diff] [blame] | 153 | |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 154 | <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> |
| 155 | <property name="entityManagerFactory" ref="entityManagerFactory" /> |
| 156 | </bean> |
| 157 | |
| 158 | <bean id="transactionTemplate" |
| 159 | class="org.springframework.transaction.support.TransactionTemplate"> |
| 160 | <constructor-arg ref="transactionManager" /> |
| 161 | </bean> |
| 162 | |
margaretha | ade7d4a | 2017-07-20 19:53:35 +0200 | [diff] [blame] | 163 | <!-- Data access objects --> |
| 164 | <bean id="resourceDao" class="de.ids_mannheim.korap.dao.ResourceDao"/> |
| 165 | <!-- <bean id="annotationDao" class="de.ids_mannheim.korap.dao.AnnotationDao"/> --> |
| 166 | |
| 167 | <!-- Krill --> |
| 168 | <bean id="search_krill" class="de.ids_mannheim.korap.web.SearchKrill"> |
| 169 | <constructor-arg value="${krill.indexDir}"/> |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 170 | </bean> |
| 171 | |
margaretha | 56e8e55 | 2017-12-05 16:31:21 +0100 | [diff] [blame] | 172 | |
| 173 | <bean id="kustvakt_rewrite" class="de.ids_mannheim.korap.rewrite.FullRewriteHandler"> |
| 174 | <constructor-arg ref="kustvakt_config" /> |
| 175 | </bean> |
| 176 | |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 177 | <bean id="kustvakt_auditing" class="de.ids_mannheim.korap.handlers.JDBCAuditing"> |
| 178 | <constructor-arg ref="kustvakt_db" /> |
| 179 | </bean> |
| 180 | |
margaretha | 894a7d7 | 2017-11-08 19:24:20 +0100 | [diff] [blame] | 181 | <bean id="kustvakt_response" |
margaretha | 56e8e55 | 2017-12-05 16:31:21 +0100 | [diff] [blame] | 182 | class="de.ids_mannheim.korap.web.FullResponseHandler"> |
margaretha | 894a7d7 | 2017-11-08 19:24:20 +0100 | [diff] [blame] | 183 | <constructor-arg index="0" name="iface" ref="kustvakt_auditing"/> |
| 184 | </bean> |
| 185 | |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 186 | <bean id="kustvakt_userdb" class="de.ids_mannheim.korap.handlers.EntityDao"> |
| 187 | <constructor-arg ref="kustvakt_db" /> |
| 188 | </bean> |
| 189 | |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 190 | <bean id="resource_provider" class="de.ids_mannheim.korap.handlers.ResourceDao"> |
| 191 | <constructor-arg ref="kustvakt_db" /> |
| 192 | </bean> |
| 193 | |
| 194 | <bean id="document_provider" class="de.ids_mannheim.korap.handlers.DocumentDao"> |
| 195 | <constructor-arg ref="kustvakt_db" /> |
| 196 | </bean> |
| 197 | |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 198 | <bean name="kustvakt_encryption" |
| 199 | class="de.ids_mannheim.korap.interfaces.defaults.KustvaktEncryption"> |
| 200 | <constructor-arg ref="kustvakt_config" /> |
| 201 | </bean> |
| 202 | |
| 203 | <!-- authentication providers to use --> |
margaretha | 4de4119 | 2017-11-15 11:47:11 +0100 | [diff] [blame] | 204 | <!-- <bean id="api_auth" class="de.ids_mannheim.korap.authentication.APIAuthentication"> |
| 205 | <constructor-arg type="de.ids_mannheim.korap.config.KustvaktConfiguration" |
| 206 | ref="kustvakt_config" /> |
| 207 | </bean> --> |
| 208 | |
| 209 | <bean id="ldap_auth" class="de.ids_mannheim.korap.authentication.LdapAuth3"> |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 210 | <constructor-arg type="de.ids_mannheim.korap.config.KustvaktConfiguration" |
| 211 | ref="kustvakt_config" /> |
| 212 | </bean> |
| 213 | |
| 214 | <bean id="openid_auth" |
margaretha | 139d0f7 | 2017-11-14 18:56:22 +0100 | [diff] [blame] | 215 | class="de.ids_mannheim.korap.authentication.OpenIDconnectAuthentication"> |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 216 | <constructor-arg type="de.ids_mannheim.korap.config.KustvaktConfiguration" |
| 217 | ref="kustvakt_config" /> |
| 218 | <constructor-arg |
| 219 | type="de.ids_mannheim.korap.interfaces.db.PersistenceClient" ref="kustvakt_db" /> |
| 220 | </bean> |
| 221 | |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 222 | <bean id="session_auth" |
margaretha | 139d0f7 | 2017-11-14 18:56:22 +0100 | [diff] [blame] | 223 | class="de.ids_mannheim.korap.authentication.SessionAuthentication"> |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 224 | <constructor-arg type="de.ids_mannheim.korap.config.KustvaktConfiguration" |
| 225 | ref="kustvakt_config" /> |
| 226 | <constructor-arg type="de.ids_mannheim.korap.interfaces.EncryptionIface" |
| 227 | ref="kustvakt_encryption" /> |
| 228 | </bean> |
Michael Hanl | ca740d7 | 2015-06-16 10:04:58 +0200 | [diff] [blame] | 229 | |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 230 | <util:list id="kustvakt_authproviders" |
| 231 | value-type="de.ids_mannheim.korap.interfaces.AuthenticationIface"> |
margaretha | 4de4119 | 2017-11-15 11:47:11 +0100 | [diff] [blame] | 232 | <ref bean="ldap_auth" /> |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 233 | <ref bean="session_auth" /> |
margaretha | 4de4119 | 2017-11-15 11:47:11 +0100 | [diff] [blame] | 234 | <!-- <ref bean="api_auth" /> --> |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 235 | <ref bean="openid_auth" /> |
| 236 | </util:list> |
Michael Hanl | 72c7b83 | 2015-09-03 08:42:15 +0200 | [diff] [blame] | 237 | |
| 238 | |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 239 | <bean id="userdata_details" class="de.ids_mannheim.korap.handlers.UserDetailsDao"> |
| 240 | <constructor-arg ref="kustvakt_db" /> |
| 241 | </bean> |
Michael Hanl | 72c7b83 | 2015-09-03 08:42:15 +0200 | [diff] [blame] | 242 | |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 243 | <bean id="userdata_settings" class="de.ids_mannheim.korap.handlers.UserSettingsDao"> |
| 244 | <constructor-arg ref="kustvakt_db" /> |
| 245 | </bean> |
| 246 | |
| 247 | <util:list id="kustvakt_userdata" |
| 248 | value-type="de.ids_mannheim.korap.interfaces.db.UserdataDbIface"> |
| 249 | <ref bean="userdata_details" /> |
| 250 | <ref bean="userdata_settings" /> |
| 251 | </util:list> |
Michael Hanl | 72c7b83 | 2015-09-03 08:42:15 +0200 | [diff] [blame] | 252 | |
Michael Hanl | daf8660 | 2016-05-12 14:31:52 +0200 | [diff] [blame] | 253 | |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 254 | <util:list id="kustvakt_resources" |
| 255 | value-type="de.ids_mannheim.korap.interfaces.db.ResourceOperationIface"> |
| 256 | <ref bean="document_provider" /> |
| 257 | <ref bean="resource_provider" /> |
| 258 | </util:list> |
Michael Hanl | f8fcc7a | 2016-06-03 17:41:07 +0200 | [diff] [blame] | 259 | |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 260 | <!-- specify type for constructor argument --> |
| 261 | <bean id="kustvakt_authenticationmanager" |
margaretha | 139d0f7 | 2017-11-14 18:56:22 +0100 | [diff] [blame] | 262 | class="de.ids_mannheim.korap.authentication.KustvaktAuthenticationManager"> |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 263 | <constructor-arg |
| 264 | type="de.ids_mannheim.korap.interfaces.db.EntityHandlerIface" ref="kustvakt_userdb" /> |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 265 | <constructor-arg type="de.ids_mannheim.korap.interfaces.EncryptionIface" |
| 266 | ref="kustvakt_encryption" /> |
| 267 | <constructor-arg ref="kustvakt_config" /> |
| 268 | <constructor-arg type="de.ids_mannheim.korap.interfaces.db.AuditingIface" |
| 269 | ref="kustvakt_auditing" /> |
| 270 | <constructor-arg ref="kustvakt_userdata" /> |
| 271 | <!-- inject authentication providers to use --> |
| 272 | <property name="providers" ref="kustvakt_authproviders" /> |
| 273 | </bean> |
Michael Hanl | daf8660 | 2016-05-12 14:31:52 +0200 | [diff] [blame] | 274 | |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 275 | <!-- todo: if db interfaces not loaded via spring, does transaction even |
| 276 | work then? --> |
| 277 | <!-- the transactional advice (i.e. what 'happens'; see the <aop:advisor/> |
| 278 | bean below) --> |
| 279 | <tx:advice id="txAdvice" transaction-manager="txManager"> |
| 280 | <!-- the transactional semantics... --> |
| 281 | <tx:attributes> |
| 282 | <!-- all methods starting with 'get' are read-only --> |
| 283 | <tx:method name="get*" read-only="true" rollback-for="KorAPException" /> |
| 284 | <!-- other methods use the default transaction settings (see below) --> |
| 285 | <tx:method name="*" rollback-for="KorAPException" /> |
| 286 | </tx:attributes> |
| 287 | </tx:advice> |
Michael Hanl | daf8660 | 2016-05-12 14:31:52 +0200 | [diff] [blame] | 288 | |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 289 | <!-- ensure that the above transactional advice runs for any execution of |
| 290 | an operation defined by the service interface --> |
| 291 | <aop:config> |
| 292 | <aop:pointcut id="service" |
| 293 | expression="execution(* de.ids_mannheim.korap.interfaces.db.*.*(..))" /> |
| 294 | <aop:advisor advice-ref="txAdvice" pointcut-ref="service" /> |
| 295 | </aop:config> |
Michael Hanl | f8fcc7a | 2016-06-03 17:41:07 +0200 | [diff] [blame] | 296 | |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 297 | <!-- similarly, don't forget the PlatformTransactionManager --> |
| 298 | <bean id="txManager" |
| 299 | class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> |
margaretha | 894a7d7 | 2017-11-08 19:24:20 +0100 | [diff] [blame] | 300 | <!-- <property name="dataSource" ref="dataSource" /> --> |
| 301 | <property name="dataSource" ref="sqliteDataSource" /> |
margaretha | 543f200 | 2017-07-14 00:27:15 +0200 | [diff] [blame] | 302 | </bean> |
margaretha | f68daa6 | 2017-09-21 02:11:24 +0200 | [diff] [blame] | 303 | |
margaretha | c9f1dfa | 2018-02-07 17:50:33 +0100 | [diff] [blame] | 304 | <!-- mail --> |
margaretha | aecee1b | 2018-02-20 14:44:21 +0100 | [diff] [blame] | 305 | <bean id="authenticator" class="de.ids_mannheim.korap.service.MailAuthenticator"> |
| 306 | <constructor-arg index="0" value="${mail.username}"/> |
| 307 | <constructor-arg index="1" value="${mail.password}"/> |
| 308 | </bean> |
| 309 | <bean id="smtpSession" class="javax.mail.Session" factory-method="getInstance"> |
| 310 | <constructor-arg index="0"> |
| 311 | <props> |
| 312 | <prop key="mail.smtp.submitter">${mail.username}</prop> |
| 313 | <prop key="mail.smtp.auth">${mail.auth}</prop> |
| 314 | <prop key="mail.smtp.host">${mail.host}</prop> |
| 315 | <prop key="mail.smtp.port">${mail.port}</prop> |
| 316 | <prop key="mail.smtp.starttls.enable">${mail.starttls.enable}</prop> |
| 317 | <prop key="mail.smtp.connectiontimeout">${mail.connectiontimeout}</prop> |
| 318 | </props> |
| 319 | </constructor-arg> |
| 320 | <constructor-arg index="1" ref="authenticator"/> |
margaretha | c9f1dfa | 2018-02-07 17:50:33 +0100 | [diff] [blame] | 321 | </bean> |
| 322 | <bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl"> |
margaretha | aecee1b | 2018-02-20 14:44:21 +0100 | [diff] [blame] | 323 | <property name="username" value="${mail.username}" /> |
| 324 | <property name="password" value="${mail.password}" /> |
margaretha | c9f1dfa | 2018-02-07 17:50:33 +0100 | [diff] [blame] | 325 | <property name="session" ref="smtpSession" /> |
| 326 | </bean> |
| 327 | <bean id="velocityEngine" class="org.apache.velocity.app.VelocityEngine"> |
| 328 | <constructor-arg index="0"> |
| 329 | <props> |
| 330 | <prop key="resource.loader">class</prop> |
margaretha | aecee1b | 2018-02-20 14:44:21 +0100 | [diff] [blame] | 331 | <prop key="class.resource.loader.class">org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader</prop> |
margaretha | c9f1dfa | 2018-02-07 17:50:33 +0100 | [diff] [blame] | 332 | </props> |
| 333 | </constructor-arg> |
margaretha | aecee1b | 2018-02-20 14:44:21 +0100 | [diff] [blame] | 334 | </bean> |
Michael Hanl | ca740d7 | 2015-06-16 10:04:58 +0200 | [diff] [blame] | 335 | </beans> |