Integrating spring-boot-starter-security with Spring Vaadin issues

I’m trying to integrating Spring Security with Vaadin Spring (https://vaadin.com/wiki/-/wiki/Main/Vaadin+Spring).

My application class just starts up the Spring Applicationhttps://gist.github.com/anonymous/c047030c61b90c02d1ef

I created a class that extends WebSecurityConfigurerAdapterhttps://gist.github.com/anonymous/0e905d0627adf5e2dc39

pom.xml includes the dependency spring-boot-starter-security

When I type in localhost:8080 it redirects me to the login url (http://localhost:8080/login) provided by Spring Security. I enter in the username/password (user/password) and I get this error.

java.lang.NullPointerException: null at com.vaadin.server.LegacyCommunicationManager.getClientCache(LegacyCommunicationManager.java:194) (full log output at https://gist.github.com/anonymous/b4be702762b5bc744c66).

I tried adding to the ApplicationSecurity the overridden method “configuration(HttpSecurity http)” based off examples I found on the web but that gives me more errors as that doesn’t take me to the /login page at all.

I have simplified the ApplicationSecurity class and I still get the same error.

gist.github.com/anonymous/9bbf2991ffdca7f002c9

The simplified class should permit all request.

add the highlighted code

public class ApplicationSecurity
extends WebSecurityConfigurerAdapter
{
@Override
protected void configure( HttpSecurity http )
throws Exception
{
http
.authorizeRequests()
.anyRequest().permitAll()
[color=#FFFF00]

[/color]
.and()


.csrf().disable()
;
}


}

Thanks psc1952. I’ll try the new implementation this will and will update the forum with my findings.