diff --git a/samples/boot/hellorsocket/src/integration-test/java/sample/HelloRSocketApplicationITests.java b/samples/boot/hellorsocket/src/integration-test/java/sample/HelloRSocketApplicationITests.java index 1e7e2f360c..8957a2be1c 100644 --- a/samples/boot/hellorsocket/src/integration-test/java/sample/HelloRSocketApplicationITests.java +++ b/samples/boot/hellorsocket/src/integration-test/java/sample/HelloRSocketApplicationITests.java @@ -15,8 +15,6 @@ */ package sample; -import org.junit.Test; -import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.rsocket.context.RSocketServerInitializedEvent; import org.springframework.boot.test.context.SpringBootTest; @@ -27,6 +25,9 @@ import org.springframework.security.rsocket.metadata.BasicAuthenticationEncoder; import org.springframework.security.rsocket.metadata.UsernamePasswordMetadata; import org.springframework.test.context.TestPropertySource; import org.springframework.test.context.junit4.SpringRunner; + +import org.junit.Test; +import org.junit.runner.RunWith; import reactor.core.publisher.Mono; import static org.assertj.core.api.Assertions.assertThat; @@ -91,7 +92,7 @@ public class HelloRSocketApplicationITests { @Override public void onApplicationEvent(RSocketServerInitializedEvent event) { - this.port = event.getrSocketServer().address().getPort(); + this.port = event.getServer().address().getPort(); } } } diff --git a/samples/boot/hellorsocket/src/main/java/sample/HelloRSocketSecurityConfig.java b/samples/boot/hellorsocket/src/main/java/sample/HelloRSocketSecurityConfig.java index 057d960251..9f469f08e7 100644 --- a/samples/boot/hellorsocket/src/main/java/sample/HelloRSocketSecurityConfig.java +++ b/samples/boot/hellorsocket/src/main/java/sample/HelloRSocketSecurityConfig.java @@ -16,14 +16,12 @@ package sample; -import org.springframework.boot.rsocket.server.ServerRSocketFactoryCustomizer; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.rsocket.EnableRSocketSecurity; import org.springframework.security.core.userdetails.MapReactiveUserDetailsService; import org.springframework.security.core.userdetails.User; import org.springframework.security.core.userdetails.UserDetails; -import org.springframework.security.rsocket.core.SecuritySocketAcceptorInterceptor; /** * @author Rob Winch @@ -43,9 +41,4 @@ public class HelloRSocketSecurityConfig { return new MapReactiveUserDetailsService(user); } - @Bean - ServerRSocketFactoryCustomizer springSecurityRSocketSecurity( - SecuritySocketAcceptorInterceptor interceptor) { - return builder -> builder.addSocketAcceptorPlugin(interceptor); - } }