bulk auto reformat ca. 2900 files using ./gradlew :spotlessApply [FINERACT-1006]

This commit is contained in:
Michael Vorburger
2020-06-14 18:31:47 +02:00
committed by Michael Vorburger ⛑️
parent 89e321acaf
commit 9da5932307
2899 changed files with 44572 additions and 46101 deletions
@@ -22,17 +22,17 @@
<entity-mappings xmlns="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd"
version="2.0">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd"
version="2.0">
<persistence-unit-metadata>
<persistence-unit-defaults>
<entity-listeners>
<entity-listener
class="org.springframework.data.jpa.domain.support.AuditingEntityListener" />
</entity-listeners>
</persistence-unit-defaults>
</persistence-unit-metadata>
<persistence-unit-metadata>
<persistence-unit-defaults>
<entity-listeners>
<entity-listener
class="org.springframework.data.jpa.domain.support.AuditingEntityListener" />
</entity-listeners>
</persistence-unit-defaults>
</persistence-unit-metadata>
</entity-mappings>
@@ -22,17 +22,17 @@
<persistence version="2.0"
xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="jpa-pu" transaction-type="RESOURCE_LOCAL">
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
<properties>
<persistence-unit name="jpa-pu" transaction-type="RESOURCE_LOCAL">
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
<properties>
<property name="openjpa.Compatibility" value="QuotedNumbersInQueries=true"/>
<property name="openjpa.jdbc.DBDictionary" value="org.apache.fineract.infrastructure.core.domain.MySQLDictionaryCustom"/>
<!--<property name="openjpa.InverseManager" value="true(Action=warn)"/> -->
<!-- <property name="openjpa.Log" value="DefaultLevel=WARN, Runtime=INFO, Tool=INFO, SQL=TRACE"/>-->
<property name="openjpa.jdbc.MappingDefaults" value="ForeignKeyDeleteAction=CASCADE"/>
</properties>
</persistence-unit>
</persistence>
</properties>
</persistence-unit>
</persistence>
@@ -21,89 +21,89 @@
-->
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns:sec="http://www.springframework.org/schema/security"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:cache="http://www.springframework.org/schema/cache"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:jpa="http://www.springframework.org/schema/data/jpa" xmlns:sec="http://www.springframework.org/schema/security"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:cache="http://www.springframework.org/schema/cache"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd">
<sec:global-method-security
pre-post-annotations="enabled" />
<sec:global-method-security
pre-post-annotations="enabled" />
<context:component-scan
base-package="org.apache.fineract.accounting.*,
org.apache.fineract.commands.provider.*,
org.apache.fineract.commands.handler.*,
org.apache.fineract.commands.service.*,
org.apache.fineract.commands.*,
org.apache.fineract.audit.*,
org.apache.fineract.infrastructure.creditbureau.*,
org.apache.fineract.infrastructure.*,
org.apache.fineract.infrastructure.core.security*,
org.apache.fineract.scheduledjobs.*,
org.apache.fineract.organisation.*,
org.apache.fineract.interoperation.*,
org.apache.fineract.portfolio.loanaccount.*,
org.apache.fineract.portfolio.savingsaccount.*,
org.apache.fineract.portfolio.*,
org.apache.fineract.useradministration.*,
org.apache.fineract.mix.*,
org.apache.fineract.notification.*,
org.apache.fineract.template.*,
org.apache.fineract.template.service.*,
org.apache.fineract.useradministration.*,
org.apache.fineract.batch,
org.apache.fineract.adhocquery.*,
org.apache.fineract.infrastructure.campaigns.**">
<context:exclude-filter expression="org.springframework.stereotype.Controller"
type="annotation" />
<context:component-scan
base-package="org.apache.fineract.accounting.*,
org.apache.fineract.commands.provider.*,
org.apache.fineract.commands.handler.*,
org.apache.fineract.commands.service.*,
org.apache.fineract.commands.*,
org.apache.fineract.audit.*,
org.apache.fineract.infrastructure.creditbureau.*,
org.apache.fineract.infrastructure.*,
org.apache.fineract.infrastructure.core.security*,
org.apache.fineract.scheduledjobs.*,
org.apache.fineract.organisation.*,
org.apache.fineract.interoperation.*,
org.apache.fineract.portfolio.loanaccount.*,
org.apache.fineract.portfolio.savingsaccount.*,
org.apache.fineract.portfolio.*,
org.apache.fineract.useradministration.*,
org.apache.fineract.mix.*,
org.apache.fineract.notification.*,
org.apache.fineract.template.*,
org.apache.fineract.template.service.*,
org.apache.fineract.useradministration.*,
org.apache.fineract.batch,
org.apache.fineract.adhocquery.*,
org.apache.fineract.infrastructure.campaigns.**">
<context:exclude-filter expression="org.springframework.stereotype.Controller"
type="annotation" />
<!-- We do NOT want all @Configuration "beans" to be auto-detected by ComponentScan,
but we want to use / import them explicitly in Tests & Spring Boot applications,
or other import in other @Configuration, so that we could have mutually exclusive ones.
-->
<context:exclude-filter expression="org.springframework.context.annotation.Configuration"
type="annotation" />
</context:component-scan>
<!-- We do NOT want all @Configuration "beans" to be auto-detected by ComponentScan,
but we want to use / import them explicitly in Tests & Spring Boot applications,
or other import in other @Configuration, so that we could have mutually exclusive ones.
-->
<context:exclude-filter expression="org.springframework.context.annotation.Configuration"
type="annotation" />
</context:component-scan>
<bean id="auditorAware"
class="org.apache.fineract.infrastructure.core.domain.AuditorAwareImpl" />
<jpa:auditing auditor-aware-ref="auditorAware" />
<jpa:repositories base-package="org.apache.fineract.commands.domain" />
<jpa:repositories base-package="org.apache.fineract.infrastructure.*.domain" />
<jpa:repositories base-package="org.apache.fineract.accounting.*.domain" />
<jpa:repositories base-package="org.apache.fineract.useradministration.domain" />
<jpa:repositories base-package="org.apache.fineract.organisation.*.domain" />
<jpa:repositories base-package="org.apache.fineract.portfolio.*" />
<jpa:repositories base-package="org.apache.fineract.mix.domain" />
<jpa:repositories base-package="org.apache.fineract.scheduledjobs.domain" />
<jpa:repositories base-package="org.apache.fineract.template.domain" />
<jpa:repositories base-package="org.apache.fineract.infrastructure.campaigns.sms.domain" />
<jpa:repositories base-package="org.apache.fineract.adhocquery.domain" />
<jpa:repositories base-package="org.apache.fineract.notification.domain"/>
<jpa:repositories base-package="org.apache.fineract.infrastructure.campaigns.email.domain"/>
<jpa:repositories base-package="org.apache.fineract.interoperation.domain"/>
<bean id="auditorAware"
class="org.apache.fineract.infrastructure.core.domain.AuditorAwareImpl" />
<jpa:auditing auditor-aware-ref="auditorAware" />
<jpa:repositories base-package="org.apache.fineract.commands.domain" />
<jpa:repositories base-package="org.apache.fineract.infrastructure.*.domain" />
<jpa:repositories base-package="org.apache.fineract.accounting.*.domain" />
<jpa:repositories base-package="org.apache.fineract.useradministration.domain" />
<jpa:repositories base-package="org.apache.fineract.organisation.*.domain" />
<jpa:repositories base-package="org.apache.fineract.portfolio.*" />
<jpa:repositories base-package="org.apache.fineract.mix.domain" />
<jpa:repositories base-package="org.apache.fineract.scheduledjobs.domain" />
<jpa:repositories base-package="org.apache.fineract.template.domain" />
<jpa:repositories base-package="org.apache.fineract.infrastructure.campaigns.sms.domain" />
<jpa:repositories base-package="org.apache.fineract.adhocquery.domain" />
<jpa:repositories base-package="org.apache.fineract.notification.domain"/>
<jpa:repositories base-package="org.apache.fineract.infrastructure.campaigns.email.domain"/>
<jpa:repositories base-package="org.apache.fineract.interoperation.domain"/>
<import resource="infrastructure.xml" />
<import resource="infrastructure.xml" />
<import resource="securityContext.xml" />
<import resource="securityContext.xml" />
<import resource="cache.xml" />
<import resource="cache.xml" />
<bean id="applicationEventMulticaster" class="org.springframework.context.event.SimpleApplicationEventMulticaster">
<property name="taskExecutor">
<bean class="org.springframework.core.task.SimpleAsyncTaskExecutor"/>
</property>
</bean>
<!-- The application events (for importing) rely on the inheritable thread local security context strategy
This is NOT compatible with threadpools so if we use threadpools the below will need to be reworked -->
<bean
<bean id="applicationEventMulticaster" class="org.springframework.context.event.SimpleApplicationEventMulticaster">
<property name="taskExecutor">
<bean class="org.springframework.core.task.SimpleAsyncTaskExecutor"/>
</property>
</bean>
<!-- The application events (for importing) rely on the inheritable thread local security context strategy
This is NOT compatible with threadpools so if we use threadpools the below will need to be reworked -->
<bean
class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetClass"
value="org.springframework.security.core.context.SecurityContextHolder" />
@@ -111,7 +111,7 @@
<property name="arguments" value="MODE_INHERITABLETHREADLOCAL" />
</bean>
<import resource="spmContext.xml"/>
<import resource="spmContext.xml"/>
<import resource="swagger.xml"/>
<import resource="swagger.xml"/>
</beans>
@@ -22,18 +22,18 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:p="http://www.springframework.org/schema/p"
xmlns:cache="http://www.springframework.org/schema/cache"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:p="http://www.springframework.org/schema/p"
xmlns:cache="http://www.springframework.org/schema/cache"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd">
<bean id="ehcacheManager" class="org.springframework.cache.jcache.JCacheCacheManager"
p:cacheManager-ref="ehcacheInstance" />
<bean id="ehcacheManager" class="org.springframework.cache.jcache.JCacheCacheManager"
p:cacheManager-ref="ehcacheInstance" />
<bean id="ehcacheInstance"
class="org.springframework.cache.jcache.JCacheManagerFactoryBean"/>
<bean id="ehcacheInstance"
class="org.springframework.cache.jcache.JCacheManagerFactoryBean"/>
</beans>
</beans>
@@ -22,35 +22,35 @@
<config xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns='http://www.ehcache.org/v3'
xsi:schemaLocation="http://www.ehcache.org/v3 http://www.ehcache.org/schema/ehcache-core-3.7.xsd">
xsi:schemaLocation="http://www.ehcache.org/v3 http://www.ehcache.org/schema/ehcache-core-3.7.xsd">
<defaultCache eternal="true" maxEntriesLocalHeap="100"
overflowToDisk="false" />
<defaultCache eternal="true" maxEntriesLocalHeap="100"
overflowToDisk="false" />
<cache name="users" maxEntriesLocalHeap="10000" eternal="true"
overflowToDisk="false" />
<cache name="usersByUsername" maxEntriesLocalHeap="10000"
eternal="true" overflowToDisk="false" />
<cache name="tenantsById" maxEntriesLocalHeap="10000" eternal="true"
overflowToDisk="false" />
<cache name="offices" maxEntriesLocalHeap="10000" eternal="true"
overflowToDisk="false" />
<cache name="officesForDropdown" maxEntriesLocalHeap="10000"
eternal="true" overflowToDisk="false" />
<cache name="officesById" maxEntriesLocalHeap="10000" eternal="true"
overflowToDisk="false" />
<cache name="charges" maxEntriesLocalHeap="10000" eternal="true"
overflowToDisk="false" />
<cache name="funds" maxEntriesLocalHeap="10000" eternal="true"
overflowToDisk="false" />
<cache name="code_values" maxEntriesLocalHeap="10000" eternal="true"
overflowToDisk="false" />
<cache name="codes" maxEntriesLocalHeap="10000" eternal="true"
overflowToDisk="false" />
<cache name="hooks" maxEntriesLocalHeap="10000" eternal="true"
overflowToDisk="false" />
<cache name="userTFAccessToken" maxEntriesLocalHeap="10000"
overflowToDisk="false" timeToIdleSeconds="7200" />
<cache name="tfConfig" maxEntriesLocalHeap="10000" eternal="true"
overflowToDisk="false" />
</config>
<cache name="users" maxEntriesLocalHeap="10000" eternal="true"
overflowToDisk="false" />
<cache name="usersByUsername" maxEntriesLocalHeap="10000"
eternal="true" overflowToDisk="false" />
<cache name="tenantsById" maxEntriesLocalHeap="10000" eternal="true"
overflowToDisk="false" />
<cache name="offices" maxEntriesLocalHeap="10000" eternal="true"
overflowToDisk="false" />
<cache name="officesForDropdown" maxEntriesLocalHeap="10000"
eternal="true" overflowToDisk="false" />
<cache name="officesById" maxEntriesLocalHeap="10000" eternal="true"
overflowToDisk="false" />
<cache name="charges" maxEntriesLocalHeap="10000" eternal="true"
overflowToDisk="false" />
<cache name="funds" maxEntriesLocalHeap="10000" eternal="true"
overflowToDisk="false" />
<cache name="code_values" maxEntriesLocalHeap="10000" eternal="true"
overflowToDisk="false" />
<cache name="codes" maxEntriesLocalHeap="10000" eternal="true"
overflowToDisk="false" />
<cache name="hooks" maxEntriesLocalHeap="10000" eternal="true"
overflowToDisk="false" />
<cache name="userTFAccessToken" maxEntriesLocalHeap="10000"
overflowToDisk="false" timeToIdleSeconds="7200" />
<cache name="tfConfig" maxEntriesLocalHeap="10000" eternal="true"
overflowToDisk="false" />
</config>
@@ -22,13 +22,13 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:jee="http://www.springframework.org/schema/jee"
xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:jee="http://www.springframework.org/schema/jee"
xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd">
<!-- HikariCP Database bean -->
<!-- HikariCP Database bean -->
<bean id="hikariTenantDataSource" class="com.zaxxer.hikari.HikariDataSource" destroy-method="close">
<constructor-arg ref="hikariConfig" />
</bean>
@@ -47,7 +47,7 @@
<!-- These are the properties for the all Tenants DB; the same configuration is also (hard-coded) in the TomcatJdbcDataSourcePerTenantService class -->
<property name="dataSourceProperties">
<props>
<!-- https://github.com/brettwooldridge/HikariCP/wiki/MySQL-Configuration -->
<!-- https://github.com/brettwooldridge/HikariCP/wiki/MySQL-Configuration -->
<prop key="cachePrepStmts">true</prop>
<prop key="prepStmtCacheSize">250</prop>
<prop key="prepStmtCacheSqlLimit">2048</prop>
@@ -22,29 +22,29 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:jee="http://www.springframework.org/schema/jee"
xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:jee="http://www.springframework.org/schema/jee"
xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.0.xsd">
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
depends-on="tenantDatabaseUpgradeService">
<property name="dataSource" ref="routingDataSource" />
<property name="persistenceUnitName" value="jpa-pu" />
<property name="jpaVendorAdapter">
<bean class="org.apache.fineract.infrastructure.openjpa.OpenJpaVendorAdapter"/>
</property>
</bean>
<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"
depends-on="tenantDatabaseUpgradeService">
<property name="dataSource" ref="routingDataSource" />
<property name="persistenceUnitName" value="jpa-pu" />
<property name="jpaVendorAdapter">
<bean class="org.apache.fineract.infrastructure.openjpa.OpenJpaVendorAdapter"/>
</property>
</bean>
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<!-- Create instance of transaction template for programmatic transaction manipulation -->
<bean id="txTemplate" class="org.springframework.transaction.support.TransactionTemplate">
<property name="transactionManager" ref="transactionManager"></property>
</bean>
<bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="entityManagerFactory" />
</bean>
<!-- Create instance of transaction template for programmatic transaction manipulation -->
<bean id="txTemplate" class="org.springframework.transaction.support.TransactionTemplate">
<property name="transactionManager" ref="transactionManager"></property>
</bean>
</beans>
@@ -24,4 +24,4 @@ SUB_PROTOCOL:mysql:thin
fineract_tenants_driver:org.drizzle.jdbc.DrizzleDriver
fineract_tenants_url:jdbc:mysql:thin://localhost:3306/fineract_tenants
fineract_tenants_uid:root
fineract_tenants_pwd:mysql
fineract_tenants_pwd:mysql
@@ -21,9 +21,9 @@
-->
<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
xsi:schemaLocation="
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:oauth="http://www.springframework.org/schema/security/oauth2"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/security/oauth2
@@ -31,201 +31,201 @@
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security.xsd">
<beans:beans profile="basicauth">
<http create-session="stateless" use-expressions="true" pattern="/api/**"
entry-point-ref="basicAuthenticationEntryPoint">
<csrf disabled="true"/>
<intercept-url pattern="/api/*/echo" access="permitAll" />
<intercept-url pattern="/api/*/authentication" access="permitAll"
method="POST" requires-channel="https" />
<intercept-url pattern="/api/*/self/authentication" access="permitAll"
method="POST" requires-channel="https" />
<intercept-url pattern="/api/*/self/registration" access="permitAll"
method="POST" requires-channel="https" />
<intercept-url pattern="/api/*/self/registration/user" access="permitAll"
method="POST" requires-channel="https" />
<intercept-url pattern="/api/*/twofactor" access="isFullyAuthenticated()"
method="GET" requires-channel="https" />
<intercept-url pattern="/api/*/twofactor" access="isFullyAuthenticated()"
method="POST" requires-channel="https" />
<intercept-url pattern="/api/*/twofactor/validate" access="isFullyAuthenticated()"
method="POST" requires-channel="https" />
<intercept-url pattern="/api/**" access="isFullyAuthenticated() and hasAuthority('TWOFACTOR_AUTHENTICATED')"
method="GET" requires-channel="https" />
<intercept-url pattern="/api/**" access="isFullyAuthenticated() and hasAuthority('TWOFACTOR_AUTHENTICATED')"
method="POST" requires-channel="https" />
<intercept-url pattern="/api/**" access="isFullyAuthenticated() and hasAuthority('TWOFACTOR_AUTHENTICATED')"
method="PUT" requires-channel="https" />
<intercept-url pattern="/api/**" access="isFullyAuthenticated() and hasAuthority('TWOFACTOR_AUTHENTICATED')"
method="DELETE" requires-channel="https" />
<intercept-url pattern="/api/**" access="isFullyAuthenticated() and hasAuthority('TWOFACTOR_AUTHENTICATED')"
method="HEAD" requires-channel="https" />
<custom-filter after="SECURITY_CONTEXT_FILTER" ref="basicAuthenticationProcessingFilter" />
<custom-filter ref="twoFactorAuthFilter" after="BASIC_AUTH_FILTER" />
</http>
<beans:bean id="basicAuthenticationEntryPoint"
class="org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint">
<beans:property name="realmName" value="Fineract Platform API" />
</beans:bean>
<beans:bean id="passwordEncoder" class="org.springframework.security.crypto.factory.PasswordEncoderFactories"
factory-method="createDelegatingPasswordEncoder">
</beans:bean>
<beans:bean id="customAuthenticationProvider"
class="org.springframework.security.authentication.dao.DaoAuthenticationProvider">
<beans:property name="userDetailsService" ref="userDetailsService" />
<beans:property name="passwordEncoder" ref="passwordEncoder" />
</beans:bean>
<authentication-manager alias="authenticationManager"
erase-credentials="false">
<authentication-provider ref="customAuthenticationProvider" />
</authentication-manager>
</beans:beans>
<beans:beans profile="oauth">
<http create-session="stateless" use-expressions="true" pattern="/api/v1/**"
entry-point-ref="oauthAuthenticationEntryPoint"
access-decision-manager-ref="accessDecisionManager">
<csrf disabled="true"/>
<anonymous enabled="false" />
<intercept-url pattern="/api//v1/**" method="OPTIONS"
access="permitAll" requires-channel="https" />
<intercept-url pattern="/api/*/twofactor" access="isFullyAuthenticated()"
method="GET" requires-channel="https" />
<intercept-url pattern="/api/*/twofactor" access="isFullyAuthenticated()"
method="POST" requires-channel="https" />
<intercept-url pattern="/api/*/twofactor/validate" access="isFullyAuthenticated()"
method="POST" requires-channel="https" />
<intercept-url pattern="/api/v1/**" access="isFullyAuthenticated() and hasAuthority('TWOFACTOR_AUTHENTICATED')"
method="GET" requires-channel="https" />
<intercept-url pattern="/api/v1/**" access="isFullyAuthenticated() and hasAuthority('TWOFACTOR_AUTHENTICATED')"
method="POST" requires-channel="https" />
<intercept-url pattern="/api/v1/**" access="isFullyAuthenticated() and hasAuthority('TWOFACTOR_AUTHENTICATED')"
method="PUT" requires-channel="https" />
<intercept-url pattern="/api/v1/**" access="isFullyAuthenticated() and hasAuthority('TWOFACTOR_AUTHENTICATED')"
method="DELETE" requires-channel="https" />
<intercept-url pattern="/api/v1/**" access="isFullyAuthenticated() and hasAuthority('TWOFACTOR_AUTHENTICATED')"
method="HEAD" requires-channel="https" />
<custom-filter ref="tenantIdentifierProcessingFilter"
position="FIRST" />
<custom-filter before="PRE_AUTH_FILTER" ref="resourceServerFilter" />
<custom-filter ref="twoFactorAuthFilter" after="BASIC_AUTH_FILTER" />
<access-denied-handler ref="oauthAccessDeniedHandler" />
</http>
<http pattern="/api/oauth/token" create-session="stateless"
entry-point-ref="oauthAuthenticationEntryPoint" use-expressions="true"
authentication-manager-ref="clientAuthenticationManager">
<beans:beans profile="basicauth">
<http create-session="stateless" use-expressions="true" pattern="/api/**"
entry-point-ref="basicAuthenticationEntryPoint">
<csrf disabled="true"/>
<intercept-url pattern="/api/oauth/token" method="OPTIONS"
access="permitAll" requires-channel="https" />
<intercept-url pattern="/api/oauth/token" method="POST"
access="isFullyAuthenticated()" requires-channel="https" />
<anonymous enabled="false" />
<intercept-url pattern="/api/*/echo" access="permitAll" />
<intercept-url pattern="/api/*/authentication" access="permitAll"
method="POST" requires-channel="https" />
<intercept-url pattern="/api/*/self/authentication" access="permitAll"
method="POST" requires-channel="https" />
<intercept-url pattern="/api/*/self/registration" access="permitAll"
method="POST" requires-channel="https" />
<intercept-url pattern="/api/*/self/registration/user" access="permitAll"
method="POST" requires-channel="https" />
<intercept-url pattern="/api/*/twofactor" access="isFullyAuthenticated()"
method="GET" requires-channel="https" />
<intercept-url pattern="/api/*/twofactor" access="isFullyAuthenticated()"
method="POST" requires-channel="https" />
<intercept-url pattern="/api/*/twofactor/validate" access="isFullyAuthenticated()"
method="POST" requires-channel="https" />
<intercept-url pattern="/api/**" access="isFullyAuthenticated() and hasAuthority('TWOFACTOR_AUTHENTICATED')"
method="GET" requires-channel="https" />
<intercept-url pattern="/api/**" access="isFullyAuthenticated() and hasAuthority('TWOFACTOR_AUTHENTICATED')"
method="POST" requires-channel="https" />
<intercept-url pattern="/api/**" access="isFullyAuthenticated() and hasAuthority('TWOFACTOR_AUTHENTICATED')"
method="PUT" requires-channel="https" />
<intercept-url pattern="/api/**" access="isFullyAuthenticated() and hasAuthority('TWOFACTOR_AUTHENTICATED')"
method="DELETE" requires-channel="https" />
<intercept-url pattern="/api/**" access="isFullyAuthenticated() and hasAuthority('TWOFACTOR_AUTHENTICATED')"
method="HEAD" requires-channel="https" />
<custom-filter ref="tenantIdentifierProcessingFilter"
position="FIRST" />
<custom-filter ref="clientCredentialsTokenEndpointFilter"
before="BASIC_AUTH_FILTER" />
<access-denied-handler ref="oauthAccessDeniedHandler" />
</http>
<custom-filter after="SECURITY_CONTEXT_FILTER" ref="basicAuthenticationProcessingFilter" />
<custom-filter ref="twoFactorAuthFilter" after="BASIC_AUTH_FILTER" />
</http>
<beans:bean id="basicAuthenticationEntryPoint"
class="org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint">
<beans:property name="realmName" value="Fineract Platform API" />
</beans:bean>
<beans:bean id="passwordEncoder" class="org.springframework.security.crypto.factory.PasswordEncoderFactories"
factory-method="createDelegatingPasswordEncoder">
</beans:bean>
<beans:bean id="oauthAuthenticationEntryPoint"
class="org.springframework.security.oauth2.provider.error.OAuth2AuthenticationEntryPoint">
<beans:property name="realmName" value="Fineract Platform API" />
</beans:bean>
<beans:bean id="customAuthenticationProvider"
class="org.springframework.security.authentication.dao.DaoAuthenticationProvider">
<beans:property name="userDetailsService" ref="userDetailsService" />
<beans:property name="passwordEncoder" ref="passwordEncoder" />
</beans:bean>
<beans:bean id="oauthAccessDeniedHandler"
class="org.springframework.security.oauth2.provider.error.OAuth2AccessDeniedHandler" />
<beans:bean id="clientCredentialsTokenEndpointFilter"
class="org.springframework.security.oauth2.provider.client.ClientCredentialsTokenEndpointFilter">
<beans:constructor-arg value="/api/oauth/token" />
<beans:property name="authenticationManager" ref="clientAuthenticationManager" />
</beans:bean>
<beans:bean id="accessDecisionManager"
class="org.springframework.security.access.vote.UnanimousBased">
<beans:constructor-arg>
<beans:list>
<beans:bean
class="org.springframework.security.oauth2.provider.vote.ScopeVoter" />
<beans:bean class="org.springframework.security.access.vote.RoleVoter" />
<beans:bean
class="org.springframework.security.access.vote.AuthenticatedVoter" />
<beans:bean
class="org.springframework.security.web.access.expression.WebExpressionVoter" />
<beans:bean
class="org.apache.fineract.infrastructure.security.vote.SelfServiceUserAccessVote" />
</beans:list>
</beans:constructor-arg>
</beans:bean>
<authentication-manager id="clientAuthenticationManager" erase-credentials="false">
<authentication-provider user-service-ref="clientDetailsUserService" />
<authentication-manager alias="authenticationManager"
erase-credentials="false">
<authentication-provider ref="customAuthenticationProvider" />
</authentication-manager>
</authentication-manager>
</beans:beans>
<beans:beans profile="oauth">
<http create-session="stateless" use-expressions="true" pattern="/api/v1/**"
entry-point-ref="oauthAuthenticationEntryPoint"
access-decision-manager-ref="accessDecisionManager">
<csrf disabled="true"/>
<anonymous enabled="false" />
<intercept-url pattern="/api//v1/**" method="OPTIONS"
access="permitAll" requires-channel="https" />
<intercept-url pattern="/api/*/twofactor" access="isFullyAuthenticated()"
method="GET" requires-channel="https" />
<intercept-url pattern="/api/*/twofactor" access="isFullyAuthenticated()"
method="POST" requires-channel="https" />
<intercept-url pattern="/api/*/twofactor/validate" access="isFullyAuthenticated()"
method="POST" requires-channel="https" />
<intercept-url pattern="/api/v1/**" access="isFullyAuthenticated() and hasAuthority('TWOFACTOR_AUTHENTICATED')"
method="GET" requires-channel="https" />
<intercept-url pattern="/api/v1/**" access="isFullyAuthenticated() and hasAuthority('TWOFACTOR_AUTHENTICATED')"
method="POST" requires-channel="https" />
<intercept-url pattern="/api/v1/**" access="isFullyAuthenticated() and hasAuthority('TWOFACTOR_AUTHENTICATED')"
method="PUT" requires-channel="https" />
<intercept-url pattern="/api/v1/**" access="isFullyAuthenticated() and hasAuthority('TWOFACTOR_AUTHENTICATED')"
method="DELETE" requires-channel="https" />
<intercept-url pattern="/api/v1/**" access="isFullyAuthenticated() and hasAuthority('TWOFACTOR_AUTHENTICATED')"
method="HEAD" requires-channel="https" />
<custom-filter ref="tenantIdentifierProcessingFilter"
position="FIRST" />
<custom-filter before="PRE_AUTH_FILTER" ref="resourceServerFilter" />
<custom-filter ref="twoFactorAuthFilter" after="BASIC_AUTH_FILTER" />
<access-denied-handler ref="oauthAccessDeniedHandler" />
</http>
<beans:bean id="clientDetailsUserService"
class="org.springframework.security.oauth2.provider.client.ClientDetailsUserDetailsService">
<beans:constructor-arg ref="clientDetailsService" />
</beans:bean>
<http pattern="/api/oauth/token" create-session="stateless"
entry-point-ref="oauthAuthenticationEntryPoint" use-expressions="true"
authentication-manager-ref="clientAuthenticationManager">
<csrf disabled="true"/>
<intercept-url pattern="/api/oauth/token" method="OPTIONS"
access="permitAll" requires-channel="https" />
<intercept-url pattern="/api/oauth/token" method="POST"
access="isFullyAuthenticated()" requires-channel="https" />
<anonymous enabled="false" />
<beans:bean id="customAuthenticationProvider"
class="org.springframework.security.authentication.dao.DaoAuthenticationProvider">
<beans:property name="userDetailsService" ref="userDetailsService" />
<beans:property name="passwordEncoder" ref="passwordEncoder" />
</beans:bean>
<custom-filter ref="tenantIdentifierProcessingFilter"
position="FIRST" />
<custom-filter ref="clientCredentialsTokenEndpointFilter"
before="BASIC_AUTH_FILTER" />
<access-denied-handler ref="oauthAccessDeniedHandler" />
</http>
<beans:bean id="clientDetailsService"
class="org.springframework.security.oauth2.provider.client.JdbcClientDetailsService">
<beans:constructor-arg ref="routingDataSource" />
</beans:bean>
<beans:bean id="passwordEncoder" class="org.springframework.security.crypto.factory.PasswordEncoderFactories"
factory-method="createDelegatingPasswordEncoder">
</beans:bean>
<beans:bean id="tokenStore"
class="org.springframework.security.oauth2.provider.token.store.JdbcTokenStore">
<beans:constructor-arg ref="routingDataSource" />
</beans:bean>
<beans:bean id="oauthAuthenticationEntryPoint"
class="org.springframework.security.oauth2.provider.error.OAuth2AuthenticationEntryPoint">
<beans:property name="realmName" value="Fineract Platform API" />
</beans:bean>
<beans:bean id="tokenServices"
class="org.springframework.security.oauth2.provider.token.DefaultTokenServices">
<beans:property name="tokenStore" ref="tokenStore" />
<beans:property name="clientDetailsService" ref="clientDetailsService" />
<beans:property name="supportRefreshToken" value="true" />
<beans:property name="refreshTokenValiditySeconds"
value="86400" />
<beans:property name="accessTokenValiditySeconds"
value="3600" />
</beans:bean>
<beans:bean id="oauthAccessDeniedHandler"
class="org.springframework.security.oauth2.provider.error.OAuth2AccessDeniedHandler" />
<beans:bean id="userApprovalHandler"
class="org.springframework.security.oauth2.provider.approval.TokenStoreUserApprovalHandler">
<beans:property name="tokenStore" ref="tokenStore" />
<beans:property name="clientDetailsService" ref="clientDetailsService" />
<beans:property name="requestFactory" ref="oAuth2RequestFactory" />
</beans:bean>
<beans:bean id="clientCredentialsTokenEndpointFilter"
class="org.springframework.security.oauth2.provider.client.ClientCredentialsTokenEndpointFilter">
<beans:constructor-arg value="/api/oauth/token" />
<beans:property name="authenticationManager" ref="clientAuthenticationManager" />
</beans:bean>
<beans:bean id="oAuth2RequestFactory"
class="org.springframework.security.oauth2.provider.request.DefaultOAuth2RequestFactory">
<beans:constructor-arg ref="clientDetailsService" />
</beans:bean>
<beans:bean id="accessDecisionManager"
class="org.springframework.security.access.vote.UnanimousBased">
<beans:constructor-arg>
<beans:list>
<beans:bean
class="org.springframework.security.oauth2.provider.vote.ScopeVoter" />
<beans:bean class="org.springframework.security.access.vote.RoleVoter" />
<beans:bean
class="org.springframework.security.access.vote.AuthenticatedVoter" />
<beans:bean
class="org.springframework.security.web.access.expression.WebExpressionVoter" />
<beans:bean
class="org.apache.fineract.infrastructure.security.vote.SelfServiceUserAccessVote" />
</beans:list>
</beans:constructor-arg>
</beans:bean>
<oauth:authorization-server
client-details-service-ref="clientDetailsService" token-services-ref="tokenServices"
user-approval-handler-ref="userApprovalHandler" token-endpoint-url="/api/oauth/token"
authorization-endpoint-url="/api/oauth/authorize">
<oauth:refresh-token />
<oauth:password />
</oauth:authorization-server>
<authentication-manager id="clientAuthenticationManager" erase-credentials="false">
<authentication-provider user-service-ref="clientDetailsUserService" />
<authentication-provider ref="customAuthenticationProvider" />
</authentication-manager>
<oauth:resource-server id="resourceServerFilter" stateless="false"
token-services-ref="tokenServices" />
</beans:beans>
<beans:bean id="clientDetailsUserService"
class="org.springframework.security.oauth2.provider.client.ClientDetailsUserDetailsService">
<beans:constructor-arg ref="clientDetailsService" />
</beans:bean>
<beans:bean id="customAuthenticationProvider"
class="org.springframework.security.authentication.dao.DaoAuthenticationProvider">
<beans:property name="userDetailsService" ref="userDetailsService" />
<beans:property name="passwordEncoder" ref="passwordEncoder" />
</beans:bean>
<beans:bean id="clientDetailsService"
class="org.springframework.security.oauth2.provider.client.JdbcClientDetailsService">
<beans:constructor-arg ref="routingDataSource" />
</beans:bean>
<beans:bean id="tokenStore"
class="org.springframework.security.oauth2.provider.token.store.JdbcTokenStore">
<beans:constructor-arg ref="routingDataSource" />
</beans:bean>
<beans:bean id="tokenServices"
class="org.springframework.security.oauth2.provider.token.DefaultTokenServices">
<beans:property name="tokenStore" ref="tokenStore" />
<beans:property name="clientDetailsService" ref="clientDetailsService" />
<beans:property name="supportRefreshToken" value="true" />
<beans:property name="refreshTokenValiditySeconds"
value="86400" />
<beans:property name="accessTokenValiditySeconds"
value="3600" />
</beans:bean>
<beans:bean id="userApprovalHandler"
class="org.springframework.security.oauth2.provider.approval.TokenStoreUserApprovalHandler">
<beans:property name="tokenStore" ref="tokenStore" />
<beans:property name="clientDetailsService" ref="clientDetailsService" />
<beans:property name="requestFactory" ref="oAuth2RequestFactory" />
</beans:bean>
<beans:bean id="oAuth2RequestFactory"
class="org.springframework.security.oauth2.provider.request.DefaultOAuth2RequestFactory">
<beans:constructor-arg ref="clientDetailsService" />
</beans:bean>
<oauth:authorization-server
client-details-service-ref="clientDetailsService" token-services-ref="tokenServices"
user-approval-handler-ref="userApprovalHandler" token-endpoint-url="/api/oauth/token"
authorization-endpoint-url="/api/oauth/authorize">
<oauth:refresh-token />
<oauth:password />
</oauth:authorization-server>
<oauth:resource-server id="resourceServerFilter" stateless="false"
token-services-ref="tokenServices" />
</beans:beans>
</beans:beans>
@@ -26,9 +26,9 @@
xmlns:jpa="http://www.springframework.org/schema/data/jpa"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:component-scan base-package="org.apache.fineract.spm.**"/>
@@ -71,4 +71,4 @@
<property name="scan" value="true"/>
</bean>
</beans>
</beans>