Vaadin/Springboot does not find theme

Hi *,

I’ve followed the vaadin spring tutorial, but when starting the application and access the vaadin UI in the browser, a theme no theme is found.

Requested resource
[/VAADIN/widgetsets/com.vaadin.DefaultWidgetSet/com.vaadin.DefaultWidgetSet.nocache.js] not found from filesystem or through class loader. Add widgetset and/or theme JAR to your classpath or add files to WebContent/VAADIN folder.

In tried it with @Theme(“valo”) in the UI class and without any theme annotation. vaadin-themes-8.3.0 is in showing in the classpath.

Any ideas?

Kind regards
Jan

You have probably enabled Spring Security in your app, but you have not yet configured it so that access to VAADIN folder is allowed.

In your security configuration class in this methdod

    @Override
    protected void configure(HttpSecurity http) throws Exception 

You need to add following

        ExpressionUrlAuthorizationConfigurer<HttpSecurity>.ExpressionInterceptUrlRegistry reg = http
                .authorizeRequests();
        reg = reg.antMatchers("/VAADIN/**").permitAll();

Thanks for your reply, but I haven’t setup any security configuration. I just followed this tutorial http://vaadin.github.io/spring-tutorial/

ok, I found it. One of the vaadin files on my local drive was corrupt … got maven to download it again and now everything works fine.