How do I set "original.frontend.resources=true" using vaadin with spring bo

Hello,

I described my original problem [here]
(https://vaadin.com/forum/thread/17339548)

But if i could set this servlet parameter i would be fine for now.

Any help is appreciated

You can still set those properties as system properties. But you can also use Spring properties. The Spring configuration properties have the same names but they are prefixed with “vaadin.”.

e.g.

vaadin.original.frontend.resources=true

You can find information about all vaadin properties bellow:


Great! Thank you!

No, sorry, not working. The error is still:
Thu Nov 08 16:48:23 GMT 2018
There was an unexpected error (type=Internal Server Error, status=500).
Failed to find the bundle manifest file ‘frontend://vaadin-flow-bundle-manifest.json’ in the servlet context for ‘ES6’ browsers. If you are running a dev-mode servlet container in maven e.g. jetty:run change it to jetty:run-exploded. If you are not compiling frontend resources, include the ‘vaadin-maven-plugin’ in your build script. Otherwise, you can skip this error either by disabling production mode, or by setting the servlet parameter ‘original.frontend.resources=true’.

but my config is

vaadin:
  productionMode: true
  servlet:
    productionMode: true
  original:
    frontend:
      resources: true

I have same problem and found the following at com.vaadin.flow.spring.SpringServlet :

private void config(Properties properties) {
        this.setProperty("productionMode", properties);
        this.setProperty("disable-xsrf-protection", properties);
        this.setProperty("closeIdleSessions", properties);
        this.setProperty("heartbeatInterval", properties);
        this.setProperty("sendUrlsAsParameters", properties);
        this.setProperty("pushMode", properties);
        this.setProperty("pushLongPollingSuspendTimeout", properties);
        this.setProperty("requestTiming", properties);
        this.setProperty("disable.webjars", properties);
        this.setProperty("frontend.url.es5", properties);
        this.setProperty("frontend.url.es6", properties);
        this.setProperty("i18n.provider", properties);
    }

    private void setProperty(String property, Properties properties) {
        this.setProperty("vaadin." + property, property, properties);
    }

ie. it does not set original.frontend.resources

2018-11-08 16:41:22.106 ERROR 23003 --- [nio-8080-exec-1]
 o.a.c.c.C.[.[.
[/]
.[dispatcher]
 : Servlet.service() for servlet [dispatcher]
 in context with path [] threw exception [Servlet.init() for servlet [springServlet]
 threw exception] with root cause

java.lang.IllegalArgumentException: Failed to find the bundle manifest file 'frontend://vaadin-flow-bundle-manifest.json' in the servlet context for 'ES6' browsers. If you are running a dev-mode servlet container in maven e.g. `jetty:run` change it to `jetty:run-exploded`. If you are not compiling frontend resources, include the 'vaadin-maven-plugin' in your build script. Otherwise, you can skip this error either by disabling production mode, or by setting the servlet parameter 'original.frontend.resources=true'.
at com.vaadin.flow.server.startup.BundleFilterInitializer.readBundleManifest(BundleFilterInitializer.java:77) ~[flow-server-1.0.5.jar!/:na]

at com.vaadin.flow.server.startup.BundleFilterInitializer.addBundleFilterForBrowser(BundleFilterInitializer.java:68) ~[flow-server-1.0.5.jar!/:na]

at com.vaadin.flow.server.startup.BundleFilterInitializer.serviceInit(BundleFilterInitializer.java:62) ~[flow-server-1.0.5.jar!/:na]

at com.vaadin.flow.server.VaadinService.lambda$init$0(VaadinService.java:249) ~[flow-server-1.0.5.jar!/:na]

at java.util.Iterator.forEachRemaining(Iterator.java:116) ~[na:1.8.0_162]

at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) ~[na:1.8.0_162]

at java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:742) ~[na:1.8.0_162]

at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) ~[na:1.8.0_162]

at com.vaadin.flow.server.VaadinService.init(VaadinService.java:249) ~[flow-server-1.0.5.jar!/:na]

at com.vaadin.flow.spring.SpringServlet.createServletService(SpringServlet.java:56) ~[vaadin-spring-10.0.4.jar!/:na]

at com.vaadin.flow.server.VaadinServlet.createServletService(VaadinServlet.java:240) ~[flow-server-1.0.5.jar!/:na]

at com.vaadin.flow.server.VaadinServlet.init(VaadinServlet.java:77) ~[flow-server-1.0.5.jar!/:na]

see also com.vaadin.flow.function.DeploymentConfiguration

default boolean useCompiledFrontendResources() {
        return this.isProductionMode() && !this.getBooleanProperty("original.frontend.resources", false);
    }

Okay, but isn’t this supposed to be a bug?
Any idea how to use a custom subclass of the SpringServlet, it does not seem to be a spring managed bean :frowning:

There is a bug in setting the parameters: https://github.com/vaadin/spring/issues/372

With a new version of the maven plugin my CI pipeline is working now.
[https://github.com/vaadin/maven-plugin/issues/115]
(https://github.com/vaadin/maven-plugin/issues/115)

At least for me there is no more need to set this parameter.