Package com.vaadin.flow.spring
Class VaadinConfigurationProperties
- java.lang.Object
-
- com.vaadin.flow.spring.VaadinConfigurationProperties
-
@ConfigurationProperties(prefix="vaadin") public class VaadinConfigurationProperties extends Object
Configuration properties for Vaadin Spring Boot.- Author:
- Vaadin Ltd
- See Also:
- http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-external-config.html
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVaadinConfigurationProperties.Pnpm
-
Constructor Summary
Constructors Constructor Description VaadinConfigurationProperties()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description List<String>getAllowedPackages()Get a list of packages that are allowed for class scanning.List<String>getBlacklistedPackages()Deprecated, for removal: This API element is subject to removal in a future version.List<String>getBlockedPackages()Get a list of packages that are blocked for class scanning.static List<String>getExcludedUrls(org.springframework.core.env.Environment environment)Gets the excluded URLs using the given environment.List<String>getExcludeUrls()Get a list of URL patterns that are not handled by the Vaadin servlet when it is mapped to the context root.StringgetUrlMapping()Gets the url mapping for the Vaadin servlet.static StringgetUrlMapping(org.springframework.core.env.Environment environment)Gets the url mapping using the given environment.List<String>getWhitelistedPackages()Deprecated, for removal: This API element is subject to removal in a future version.booleanisAsyncSupported()Returns if asynchronous operations are supported.booleanisLaunchBrowser()Returns if a browser should be launched on startup when in development mode.booleanisLoadOnStartup()Returns if servlet is loaded on startup.booleanisPnpmEnabled()Returns if pnpm support is enabled.voidsetAllowedPackages(List<String> allowedPackages)Set list of packages to be scanned.voidsetAsyncSupported(boolean asyncSupported)SetsasyncSupportedproperty value.voidsetBlacklistedPackages(List<String> blockedPackages)Deprecated, for removal: This API element is subject to removal in a future version.voidsetBlockedPackages(List<String> blockedPackages)Set list of packages to ignore for class scanning.voidsetExcludeUrls(List<String> excludeUrls)Set a list of URL patterns that are not handled by the Vaadin servlet when it is mapped to the context root.voidsetLaunchBrowser(boolean launchBrowser)Sets whether a browser should be launched on startup when in development mode.voidsetLoadOnStartup(boolean loadOnStartup)Sets whether servlet is loaded on startup.voidsetPnpmEnabled(boolean enabled)Enables/disabled pnpm support.voidsetUrlMapping(String urlMapping)SetsurlMappingproperty value.voidsetWhitelistedPackages(List<String> allowedPackages)Deprecated, for removal: This API element is subject to removal in a future version.
-
-
-
Method Detail
-
getUrlMapping
public static String getUrlMapping(org.springframework.core.env.Environment environment)
Gets the url mapping using the given environment. This is needed only when VaadinConfigurationProperties is not available for injection, e.g. in a condition.- Parameters:
environment- the application environment- Returns:
- the url mapping or null if none is defined
-
getExcludedUrls
public static List<String> getExcludedUrls(org.springframework.core.env.Environment environment)
Gets the excluded URLs using the given environment. This is needed only when VaadinConfigurationProperties is not available for injection, e.g. when using Spring without Boot.- Parameters:
environment- the application environment- Returns:
- the excluded URLs or null if none is defined
-
getUrlMapping
public String getUrlMapping()
Gets the url mapping for the Vaadin servlet.- Returns:
- the url mapping
-
setUrlMapping
public void setUrlMapping(String urlMapping)
SetsurlMappingproperty value.- Parameters:
urlMapping- theurlMappingproperty value
-
isAsyncSupported
public boolean isAsyncSupported()
Returns if asynchronous operations are supported.- Returns:
- if async is supported
-
setAsyncSupported
public void setAsyncSupported(boolean asyncSupported)
SetsasyncSupportedproperty value.- Parameters:
asyncSupported- theasyncSupportedproperty value
-
isLoadOnStartup
public boolean isLoadOnStartup()
Returns if servlet is loaded on startup.If the servlet is not loaded on startup then the first request to the server might be incorrectly handled by
VaadinWebSecurityConfigurerAdapterand access to a public view will be denied instead of allowed.- Returns:
- if servlet is loaded on startup
-
setLoadOnStartup
public void setLoadOnStartup(boolean loadOnStartup)
Sets whether servlet is loaded on startup.If the servlet is not loaded on startup then the first request to the server might be incorrectly handled by
VaadinWebSecurityConfigurerAdapterand access to a public view will be denied instead of allowed.- Parameters:
loadOnStartup-trueto load the servlet on startup,falseotherwise
-
isLaunchBrowser
public boolean isLaunchBrowser()
Returns if a browser should be launched on startup when in development mode.- Returns:
- if a browser should be launched on startup when in development mode
-
setLaunchBrowser
public void setLaunchBrowser(boolean launchBrowser)
Sets whether a browser should be launched on startup when in development mode.- Parameters:
launchBrowser-trueto launch a browser on startup when in development mode,falseotherwise
-
isPnpmEnabled
public boolean isPnpmEnabled()
Returns if pnpm support is enabled.- Returns:
- if pnpm is enabled
-
setPnpmEnabled
public void setPnpmEnabled(boolean enabled)
Enables/disabled pnpm support.- Parameters:
enabled- iftruethen pnpm support is enabled, otherwise it's disabled
-
getBlockedPackages
public List<String> getBlockedPackages()
Get a list of packages that are blocked for class scanning.- Returns:
- blocked packages
-
setBlockedPackages
public void setBlockedPackages(List<String> blockedPackages)
Set list of packages to ignore for class scanning.- Parameters:
blockedPackages- list of packages to ignore
-
getBlacklistedPackages
@Deprecated(forRemoval=true) public List<String> getBlacklistedPackages()
Deprecated, for removal: This API element is subject to removal in a future version.Get a list of packages that are blocked for class scanning.- Returns:
- blocked packages
-
setBlacklistedPackages
@Deprecated(forRemoval=true) public void setBlacklistedPackages(List<String> blockedPackages)
Deprecated, for removal: This API element is subject to removal in a future version.Set list of packages to ignore for class scanning.- Parameters:
blockedPackages- list of packages to ignore
-
getAllowedPackages
public List<String> getAllowedPackages()
Get a list of packages that are allowed for class scanning.- Returns:
- allowed packages
-
setAllowedPackages
public void setAllowedPackages(List<String> allowedPackages)
Set list of packages to be scanned. IfallowedPackagesis set thenblockedPackagesis ignored.- Parameters:
allowedPackages- list of packages to be scanned
-
getWhitelistedPackages
@Deprecated(forRemoval=true) public List<String> getWhitelistedPackages()
Deprecated, for removal: This API element is subject to removal in a future version.Get a list of packages that are allowed for class scanning.- Returns:
- allowed packages
-
setWhitelistedPackages
@Deprecated(forRemoval=true) public void setWhitelistedPackages(List<String> allowedPackages)
Deprecated, for removal: This API element is subject to removal in a future version.Set list of packages to be scanned. IfallowedPackagesis set thenblockedPackagesis ignored.- Parameters:
allowedPackages- list of packages to be scanned
-
getExcludeUrls
public List<String> getExcludeUrls()
Get a list of URL patterns that are not handled by the Vaadin servlet when it is mapped to the context root.- Returns:
- a list of url patterns to exclude
-
-