Class HostingerApplication

java.lang.Object
de.bytestore.hostinger.HostingerApplication
All Implemented Interfaces:
com.vaadin.flow.component.page.AppShellConfigurator, Serializable

@Theme("hostinger") @SpringBootApplication @EnableSpringConfigured @MessageSourceBasenames({"de/bytestore/hostinger/space_messages","de/bytestore/hostinger/menu_messages","de/bytestore/hostinger/guardian_messages"}) @EnableAspectJAutoProxy @Configuration public class HostingerApplication extends Object implements com.vaadin.flow.component.page.AppShellConfigurator
Entry point and main configuration class for the Hostinger application. This class is the starting point of the Spring Boot application and contains various configurations and event handling methods to manage application startup. It integrates multiple Spring features such as dependency injection, application configuration, database connection setup, and event listening. Annotations applied: - @Push: Specifies WebSocket communication for push functionality. - @Theme: Defines the application's theme. - @PWA: Enables progressive web application configuration. - @SpringBootApplication: Marks this class as the main configuration class of a Spring Boot application. - @EnableSpringConfigured: Enables Spring Dependency Injection support. - @MessageSourceBasenames: Configures the locations of message resource bundles for internationalization. - @EnableAspectJAutoProxy: Enables proxy-based aspect-oriented programming (AOP). - @Configuration: Marks this class as a configuration class for the Spring application context. Implements: - AppShellConfigurator: Interface for configuring the application shell. Spring Beans: - DataSourceProperties: Configures properties for the application's primary data source. - DataSource: Initializes the application's primary data source using HikariCP. Event Listeners: - onApplicationStarted: Handles the ApplicationStartedEvent to log application startup and initialize the system service. - printApplicationUrl: Logs the URL where the application is accessible after startup.
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    main(String[] args)
    Main method that serves as the entry point of the HostingerApplication.
    void
    onApplicationStarted(org.springframework.boot.context.event.ApplicationStartedEvent event)
    Handles the `ApplicationStartedEvent` triggered when the Hostinger application has been fully started.
    void
    printApplicationUrl(org.springframework.boot.context.event.ApplicationStartedEvent event)
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.page.AppShellConfigurator

    configurePage
  • Constructor Details

    • HostingerApplication

      public HostingerApplication()
  • Method Details

    • main

      public static void main(String[] args)
      Main method that serves as the entry point of the HostingerApplication. It initializes and runs the Spring Boot application context.
      Parameters:
      args - an array of command-line arguments passed to the application
    • onApplicationStarted

      @EventListener public void onApplicationStarted(org.springframework.boot.context.event.ApplicationStartedEvent event)
      Handles the `ApplicationStartedEvent` triggered when the Hostinger application has been fully started. This method is marked with the @GainRoot annotation to indicate elevated access functionality and is registered as an event listener with @EventListener. It logs the application startup event and initializes the system services by invoking the systemService.load() method.
      Parameters:
      event - the ApplicationStartedEvent instance containing information about the application startup, such as the application context and environment details.
    • printApplicationUrl

      @EventListener public void printApplicationUrl(org.springframework.boot.context.event.ApplicationStartedEvent event)