ViteConfig
@Configuration
@ComponentScan(basePackages = "io.github.benny123tw.servlet.config")
Provides an out-of-the-box configuration for integrating Vite with Spring MVC applications.
This configuration class automatically scans the package io.github.benny123tw.servlet.config
for components and provides the necessary beans and properties to enable Vite integration.
The following properties can be configured in the application's application.properties
file:
vite.debug
- Enables or disables debug mode for Vite integration. Default istrue
.vite.manifestPath
- Specifies the path to the Vite manifest file. Default is/WEB-INF/dist/.vite/manifest.json
.vite.localServerUrl
- Specifies the URL of the local Vite development server. Default ishttp://localhost:5173
.vite.resourcePath
- Specifies the path to Vite resources. Default is/resources
.
Usage example:
@Configuration
@EnableVite
public class AppConfig {
// Your other Spring configuration
}
Content copied to clipboard
See also
Functions
Link copied to clipboard
Creates a ViteProperties bean configured with the application's Vite settings.