Class HotDeployConfig

java.lang.Object
com.wontlost.ckeditor.HotDeployConfig
All Implemented Interfaces:
com.vaadin.flow.server.VaadinServiceInitListener, Serializable, EventListener

public class HotDeployConfig extends Object implements com.vaadin.flow.server.VaadinServiceInitListener
Hot deploy configuration for Vaadin CKEditor component.

This class provides support for hot reloading during development. It is automatically registered via Vaadin's ServiceInitListener mechanism.

Hot Deploy Setup:

For Gradle projects using this addon:

// In build.gradle.kts of your application
vaadin {
    optimizeBundle = false  // Disable optimization for faster reloads
}

// Run with hot reload
./gradlew vaadinPrepareFrontend
./gradlew bootRun  // or your preferred run task

For Maven projects using this addon:

<!-- In pom.xml of your application -->
<plugin>
    <groupId>com.vaadin</groupId>
    <artifactId>vaadin-maven-plugin</artifactId>
    <configuration>
        <optimizeBundle>false</optimizeBundle>
    </configuration>
</plugin>

// Run with hot reload
mvn vaadin:prepare-frontend
mvn spring-boot:run  // or jetty:run

IDE Configuration:

  • IntelliJ IDEA: Enable "Build project automatically" and "Allow auto-make to start even if developed application is currently running"
  • Eclipse: Enable "Build Automatically" in Project menu
  • VS Code: Use the Vaadin extension with auto-build enabled

JVM Options for Hot Reload:

// For Spring Boot DevTools integration
-Dspring.devtools.restart.enabled=true

// For faster class reloading with DCEVM/HotSwapAgent
-XX:+AllowEnhancedClassRedefinition
-javaagent:/path/to/hotswap-agent.jar
See Also:
  • Field Details

    • HOT_DEPLOY_DEBUG_PROPERTY

      public static final String HOT_DEPLOY_DEBUG_PROPERTY
      System property to enable verbose hot deploy logging.
      See Also:
    • HOT_DEPLOY_DISABLED_PROPERTY

      public static final String HOT_DEPLOY_DISABLED_PROPERTY
      System property to disable hot deploy functionality.
      See Also:
  • Constructor Details

    • HotDeployConfig

      public HotDeployConfig()
  • Method Details

    • serviceInit

      public void serviceInit(com.vaadin.flow.server.ServiceInitEvent event)
      Specified by:
      serviceInit in interface com.vaadin.flow.server.VaadinServiceInitListener
    • isHotDeployDisabled

      public static boolean isHotDeployDisabled()
      Check if hot deploy is disabled via system property.
    • isDebugEnabled

      public static boolean isDebugEnabled()
      Check if debug logging is enabled.
    • isDevelopmentMode

      public static boolean isDevelopmentMode()
      Check if the application is running in development mode. This can be used to conditionally enable development features.
      Returns:
      true if in development mode
    • refreshFrontend

      public static void refreshFrontend()
      Force refresh of frontend resources. Call this method after making changes to frontend files during development.

      Note: This is typically handled automatically by Vaadin's development mode, but can be called manually if needed.

    • getStatus

      public static String getStatus()
      Get hot deploy status information.
      Returns:
      status information string