Skip to content

Commit

Permalink
Some upgrades and fixes
Browse files Browse the repository at this point in the history
* 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`
  • Loading branch information
artembilan committed Oct 25, 2017
1 parent df10941 commit efb8f04
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 27 deletions.
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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"
Expand All @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,13 @@
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;
Expand Down Expand Up @@ -118,16 +120,23 @@ public void testHttpProxyFlow() throws Exception {
@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
Expand Down Expand Up @@ -187,6 +196,12 @@ public AccessDecisionManager accessDecisionManager() {
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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ protected ChannelMessageStorePreparedStatementSetter() {
/**
* Perform a preparedStatement parameters population according provided arguments.
* The default functionality is (parameter - data):
* <p>
* <ul>
* <li>1 - messageId
* <li>2 - groupKey
Expand All @@ -94,7 +93,6 @@ protected 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,13 @@
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;
Expand Down Expand Up @@ -173,12 +176,17 @@ public void testSse() {
@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
Expand Down Expand Up @@ -232,6 +240,12 @@ public AccessDecisionManager accessDecisionManager() {
return new AffirmativeBased(Collections.singletonList(new RoleVoter()));
}

@Bean
@SuppressWarnings("deprecation")
public PasswordEncoder passwordEncoder() {
return org.springframework.security.crypto.password.NoOpPasswordEncoder.getInstance();
}

}

}

0 comments on commit efb8f04

Please sign in to comment.