Open Artur- opened 4 years ago
The production
profile is the default way of enabling and disabling production mode, but it's not the only way of doing it. The other way is based on a servlet init parameter, which is indeed tied to a specific instance. We could consider removing that way of controlling the development mode, but doing that would also require a consideration for backwards compatibility.
The way to enable production mode in a starter project is to use
This in turn does
There is nothing here that is specific to any servlet. The system property is global, the dependency is global.
Yet, if you want to check in code if you are in production mode or not, you need a reference to a
DeploymentConfiguration
that is owned by aVaadinService
which is tied to aVaadinServlet
.There does not seem to be any benefit of this arrangement and the downside that you cannot check the development/production mode without a servlet/service reference.
What I would like to do is e.g.