Some upgrades and fixes
* Upgrade to SF-5.0.1, Reactor-3.1.1, some other minor upgrades * Fix `HttpDslTests` and `WebFluxDslTests` for the latest SS compatibility * Fix JavaDoc in the `ChannelMessageStorePreparedStatementSetter`
This commit is contained in:
12
build.gradle
12
build.gradle
@@ -87,8 +87,8 @@ subprojects { subproject ->
|
||||
}
|
||||
|
||||
ext {
|
||||
activeMqVersion = '5.15.0'
|
||||
aspectjVersion = '1.8.11'
|
||||
activeMqVersion = '5.15.2'
|
||||
aspectjVersion = '1.8.12'
|
||||
apacheSshdVersion = '1.6.0'
|
||||
boonVersion = '0.34'
|
||||
commonsDbcp2Version = '2.1.1'
|
||||
@@ -119,12 +119,12 @@ subprojects { subproject ->
|
||||
jythonVersion = '2.5.3'
|
||||
kryoShadedVersion = '3.0.3'
|
||||
log4jVersion = '1.2.17'
|
||||
mockitoVersion = '2.10.0'
|
||||
mockitoVersion = '2.11.0'
|
||||
mysqlVersion = '6.0.6'
|
||||
pahoMqttClientVersion = '1.2.0'
|
||||
postgresVersion = '42.0.0'
|
||||
reactorNettyVersion = '0.7.0.RELEASE'
|
||||
reactorVersion = '3.1.0.RELEASE'
|
||||
reactorNettyVersion = '0.7.1.RELEASE'
|
||||
reactorVersion = '3.1.1.RELEASE'
|
||||
romeToolsVersion = '1.8.0'
|
||||
servletApiVersion = '3.1.0'
|
||||
slf4jVersion = "1.7.25"
|
||||
@@ -137,7 +137,7 @@ subprojects { subproject ->
|
||||
springSecurityVersion = '5.0.0.M5'
|
||||
springSocialTwitterVersion = '2.0.0.M4'
|
||||
springRetryVersion = '1.2.1.RELEASE'
|
||||
springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.0.0.RELEASE'
|
||||
springVersion = project.hasProperty('springVersion') ? project.springVersion : '5.0.1.RELEASE'
|
||||
springWsVersion = '3.0.0.BUILD-SNAPSHOT'
|
||||
tomcatVersion = "8.5.23"
|
||||
xmlUnitVersion = '1.6'
|
||||
|
||||
@@ -46,11 +46,13 @@ import org.springframework.messaging.support.MessageBuilder;
|
||||
import org.springframework.security.access.AccessDecisionManager;
|
||||
import org.springframework.security.access.vote.AffirmativeBased;
|
||||
import org.springframework.security.access.vote.RoleVoter;
|
||||
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
|
||||
import org.springframework.security.config.annotation.authentication.configurers.provisioning.InMemoryUserDetailsManagerConfigurer;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||
import org.springframework.security.core.userdetails.User;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||
import org.springframework.security.provisioning.InMemoryUserDetailsManager;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
@@ -118,16 +120,23 @@ public class HttpDslTests {
|
||||
@EnableIntegration
|
||||
public static class ContextConfiguration extends WebSecurityConfigurerAdapter {
|
||||
|
||||
@Override
|
||||
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
|
||||
InMemoryUserDetailsManagerConfigurer<?> userDetailsManagerConfigurer =
|
||||
auth.inMemoryAuthentication();
|
||||
userDetailsManagerConfigurer.withUser("admin")
|
||||
.password("admin")
|
||||
.roles("ADMIN");
|
||||
userDetailsManagerConfigurer.withUser("user")
|
||||
.password("user")
|
||||
.roles("USER");
|
||||
@Bean
|
||||
public UserDetailsService userDetailsService() {
|
||||
InMemoryUserDetailsManager manager = new InMemoryUserDetailsManager();
|
||||
|
||||
manager.createUser(
|
||||
User.withUsername("admin")
|
||||
.password("admin")
|
||||
.roles("ADMIN")
|
||||
.build());
|
||||
|
||||
manager.createUser(
|
||||
User.withUsername("user")
|
||||
.password("user")
|
||||
.roles("USER")
|
||||
.build());
|
||||
|
||||
return manager;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -187,6 +196,12 @@ public class HttpDslTests {
|
||||
return new AffirmativeBased(Collections.singletonList(new RoleVoter()));
|
||||
}
|
||||
|
||||
@Bean
|
||||
@SuppressWarnings("deprecation")
|
||||
public PasswordEncoder passwordEncoder() {
|
||||
return org.springframework.security.crypto.password.NoOpPasswordEncoder.getInstance();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ChannelSecurityInterceptor channelSecurityInterceptor(AccessDecisionManager accessDecisionManager)
|
||||
throws Exception {
|
||||
|
||||
@@ -85,7 +85,6 @@ public class ChannelMessageStorePreparedStatementSetter {
|
||||
/**
|
||||
* Perform a preparedStatement parameters population according provided arguments.
|
||||
* The default functionality is (parameter - data):
|
||||
* <p>
|
||||
* <ul>
|
||||
* <li>1 - messageId
|
||||
* <li>2 - groupKey
|
||||
@@ -94,7 +93,6 @@ public class ChannelMessageStorePreparedStatementSetter {
|
||||
* <li>5 - priority if enabled, otherwise null
|
||||
* <li>6 - serialized message if {@link #serializer} and {@link #lobHandler} are provided.
|
||||
* </ul>
|
||||
* <p>
|
||||
* An inheritor may consider to call this method for population common properties and perform
|
||||
* custom message serialization logic for the parameter #6.
|
||||
* Any custom data structure population can be achieved with full overriding of this method.
|
||||
|
||||
@@ -50,10 +50,13 @@ import org.springframework.messaging.PollableChannel;
|
||||
import org.springframework.security.access.AccessDecisionManager;
|
||||
import org.springframework.security.access.vote.AffirmativeBased;
|
||||
import org.springframework.security.access.vote.RoleVoter;
|
||||
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
|
||||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
|
||||
import org.springframework.security.core.userdetails.User;
|
||||
import org.springframework.security.core.userdetails.UserDetailsService;
|
||||
import org.springframework.security.crypto.password.PasswordEncoder;
|
||||
import org.springframework.security.provisioning.InMemoryUserDetailsManager;
|
||||
import org.springframework.test.annotation.DirtiesContext;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
@@ -173,12 +176,17 @@ public class WebFluxDslTests {
|
||||
@EnableIntegration
|
||||
public static class ContextConfiguration extends WebSecurityConfigurerAdapter {
|
||||
|
||||
@Override
|
||||
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
|
||||
auth.inMemoryAuthentication()
|
||||
.withUser("guest")
|
||||
.password("guest")
|
||||
.roles("ADMIN");
|
||||
@Bean
|
||||
public UserDetailsService userDetailsService() {
|
||||
InMemoryUserDetailsManager manager = new InMemoryUserDetailsManager();
|
||||
|
||||
manager.createUser(
|
||||
User.withUsername("guest")
|
||||
.password("guest")
|
||||
.roles("ADMIN")
|
||||
.build());
|
||||
|
||||
return manager;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -232,6 +240,12 @@ public class WebFluxDslTests {
|
||||
return new AffirmativeBased(Collections.singletonList(new RoleVoter()));
|
||||
}
|
||||
|
||||
@Bean
|
||||
@SuppressWarnings("deprecation")
|
||||
public PasswordEncoder passwordEncoder() {
|
||||
return org.springframework.security.crypto.password.NoOpPasswordEncoder.getInstance();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user