ViteConfig

@Configuration
@ComponentScan(basePackages = "com.javite.spring.config")
open class ViteConfig

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 is true.
  • 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 is http://localhost:5173.
  • vite.resourcePath - Specifies the path to Vite resources. Default is /resources.

Usage example:

@Configuration
@EnableVite
public class AppConfig {
    // Your other Spring configuration
}

See also

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
Creates a ViteProperties bean configured with the application's Vite settings.