Add missing @Override
This commit is contained in:
@@ -35,6 +35,7 @@ import org.springframework.security.provisioning.InMemoryUserDetailsManager;
|
||||
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
|
||||
@Bean
|
||||
@Override
|
||||
public UserDetailsService userDetailsService() {
|
||||
InMemoryUserDetailsManager manager = new InMemoryUserDetailsManager();
|
||||
manager.createUser(
|
||||
|
||||
@@ -31,10 +31,12 @@ import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
|
||||
public class WebSocketConfig
|
||||
extends AbstractSessionWebSocketMessageBrokerConfigurer<Session> { // <1>
|
||||
|
||||
@Override
|
||||
protected void configureStompEndpoints(StompEndpointRegistry registry) { // <2>
|
||||
registry.addEndpoint("/messages").withSockJS();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void configureMessageBroker(MessageBrokerRegistry registry) {
|
||||
registry.enableSimpleBroker("/queue/", "/topic/");
|
||||
registry.setApplicationDestinationPrefixes("/app");
|
||||
|
||||
@@ -49,6 +49,7 @@ public class UserRepositoryUserDetailsService implements UserDetailsService {
|
||||
* org.springframework.security.core.userdetails.UserDetailsService#loadUserByUsername
|
||||
* (java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
public UserDetails loadUserByUsername(String username)
|
||||
throws UsernameNotFoundException {
|
||||
User user = this.userRepository.findByEmail(username);
|
||||
@@ -64,26 +65,32 @@ public class UserRepositoryUserDetailsService implements UserDetailsService {
|
||||
super(user);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Collection<? extends GrantedAuthority> getAuthorities() {
|
||||
return AuthorityUtils.createAuthorityList("ROLE_USER");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUsername() {
|
||||
return getEmail();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAccountNonExpired() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAccountNonLocked() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isCredentialsNonExpired() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ public class WebSocketConnectHandler<S>
|
||||
this.repository = repository;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(SessionConnectEvent event) {
|
||||
MessageHeaders headers = event.getMessage().getHeaders();
|
||||
Principal user = SimpMessageHeaderAccessor.getUser(headers);
|
||||
|
||||
@@ -36,6 +36,7 @@ public class WebSocketDisconnectHandler<S>
|
||||
this.repository = repository;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(SessionDisconnectEvent event) {
|
||||
String id = event.getSessionId();
|
||||
if (id == null) {
|
||||
|
||||
Reference in New Issue
Block a user