Update servlet:xml:contacts to use Spring 6

Issue gh-46
This commit is contained in:
Marcus Da Coregio 2021-12-10 13:44:27 -03:00
parent 7d80162ab9
commit 2a9a874d41
3 changed files with 33 additions and 34 deletions

View File

@ -2,7 +2,7 @@ plugins {
id "java" id "java"
id "war" id "war"
id "nebula.integtest" version "8.2.0" id "nebula.integtest" version "8.2.0"
id "org.gretty" version "3.0.6" id "org.gretty" version "4.0.0"
} }
apply from: "gradle/gretty.gradle" apply from: "gradle/gretty.gradle"
@ -13,8 +13,8 @@ repositories {
} }
dependencies { dependencies {
implementation platform("org.springframework.security:spring-security-bom:5.6.0-SNAPSHOT") implementation platform("org.springframework.security:spring-security-bom:6.0.0-SNAPSHOT")
implementation platform("org.springframework:spring-framework-bom:5.3.9") implementation platform("org.springframework:spring-framework-bom:6.0.0-SNAPSHOT")
implementation platform("org.junit:junit-bom:5.7.0") implementation platform("org.junit:junit-bom:5.7.0")
implementation "org.springframework.security:spring-security-config" implementation "org.springframework.security:spring-security-config"
@ -30,14 +30,14 @@ dependencies {
implementation 'org.springframework:spring-tx' implementation 'org.springframework:spring-tx'
implementation 'org.slf4j:slf4j-api:1.7.30' implementation 'org.slf4j:slf4j-api:1.7.30'
implementation 'org.slf4j:slf4j-simple:1.7.30' implementation 'org.slf4j:slf4j-simple:1.7.30'
implementation 'javax.servlet:jstl:1.2'
providedCompile "jakarta.servlet:jakarta.servlet-api:5.0.0"
providedCompile "org.glassfish.web:jakarta.servlet.jsp.jstl:2.0.0"
runtimeOnly 'net.sf.ehcache:ehcache:2.10.5' runtimeOnly 'net.sf.ehcache:ehcache:2.10.5'
runtimeOnly 'org.hsqldb:hsqldb:2.5.0' runtimeOnly 'org.hsqldb:hsqldb:2.5.0'
runtimeOnly 'org.springframework:spring-context-support' runtimeOnly 'org.springframework:spring-context-support'
providedCompile 'javax.servlet:javax.servlet-api:4.0.0'
testImplementation "org.springframework:spring-test" testImplementation "org.springframework:spring-test"
testImplementation "org.springframework.security:spring-security-test" testImplementation "org.springframework.security:spring-security-test"
testImplementation("org.junit.jupiter:junit-jupiter-api") testImplementation("org.junit.jupiter:junit-jupiter-api")

View File

@ -1,5 +1,5 @@
gretty { gretty {
servletContainer = "tomcat9" servletContainer = "tomcat10"
contextPath = "/" contextPath = "/"
fileLogEnabled = false fileLogEnabled = false
integrationTestTask = 'integrationTest' integrationTestTask = 'integrationTest'

View File

@ -10,34 +10,33 @@
--> -->
<!-- ========= ACL SERVICE DEFINITIONS ========= --> <!-- ========= ACL SERVICE DEFINITIONS ========= -->
<bean id="cacheManager" class="org.springframework.cache.concurrent.ConcurrentMapCacheManager"/>
<bean id="userCacheBackend" class="org.springframework.cache.concurrent.ConcurrentMapCache">
<constructor-arg name="name" value="userCache"/>
</bean>
<bean id="aclCache" class="org.springframework.security.acls.domain.EhCacheBasedAclCache"> <bean id="aclCache" class="org.springframework.security.acls.domain.SpringCacheBasedAclCache">
<constructor-arg> <constructor-arg name="cache" ref="userCacheBackend"/>
<bean class="org.springframework.cache.ehcache.EhCacheFactoryBean"> <constructor-arg>
<property name="cacheManager"> <bean class="org.springframework.security.acls.domain.DefaultPermissionGrantingStrategy">
<bean class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"/> <constructor-arg>
</property> <bean class="org.springframework.security.acls.domain.ConsoleAuditLogger"/>
<property name="cacheName" value="aclCache"/> </constructor-arg>
</bean> </bean>
</constructor-arg> </constructor-arg>
<constructor-arg> <constructor-arg>
<bean class="org.springframework.security.acls.domain.DefaultPermissionGrantingStrategy"> <bean class="org.springframework.security.acls.domain.AclAuthorizationStrategyImpl">
<constructor-arg> <constructor-arg>
<bean class="org.springframework.security.acls.domain.ConsoleAuditLogger"/> <list>
</constructor-arg> <bean class="org.springframework.security.core.authority.SimpleGrantedAuthority">
</bean> <constructor-arg value="ROLE_ACL_ADMIN"/>
</constructor-arg> </bean>
<constructor-arg> </list>
<bean class="org.springframework.security.acls.domain.AclAuthorizationStrategyImpl"> </constructor-arg>
<constructor-arg> </bean>
<list> </constructor-arg>
<bean class="org.springframework.security.core.authority.SimpleGrantedAuthority">
<constructor-arg value="ROLE_ACL_ADMIN"/>
</bean>
</list>
</constructor-arg>
</bean>
</constructor-arg>
</bean> </bean>
<bean id="lookupStrategy" class="org.springframework.security.acls.jdbc.BasicLookupStrategy"> <bean id="lookupStrategy" class="org.springframework.security.acls.jdbc.BasicLookupStrategy">