Class ServerApplication

java.lang.Object
org.springframework.boot.web.servlet.support.SpringBootServletInitializer
org.dspace.app.ServerApplication
All Implemented Interfaces:
WebApplicationInitializer

@SpringBootApplication(scanBasePackageClasses=org.dspace.app.rest.WebApplication.class) public class ServerApplication extends org.springframework.boot.web.servlet.support.SpringBootServletInitializer
Define the Spring Boot Application settings itself. This class takes the place of a web.xml file, and configures all Filters/Listeners as methods (see below).

NOTE: Requires a Servlet 3.0 container, e.g. Tomcat 7.0 or above.

NOTE: This extends SpringBootServletInitializer in order to allow us to build a deployable WAR file with Spring Boot. See: http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-create-a-deployable-war-file

Author:
Luca Giamminonni (luca.giamminonni at 4science.it)
  • Field Summary

    Fields inherited from class org.springframework.boot.web.servlet.support.SpringBootServletInitializer

    logger
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.springframework.boot.builder.SpringApplicationBuilder
    configure(org.springframework.boot.builder.SpringApplicationBuilder application)
    Override the default SpringBootServletInitializer.configure() method, passing it this Application class.

    Methods inherited from class org.springframework.boot.web.servlet.support.SpringBootServletInitializer

    createRootApplicationContext, createSpringApplicationBuilder, deregisterJdbcDrivers, onStartup, run, setRegisterErrorPageFilter, shutDownSharedReactorSchedulers

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ServerApplication

      public ServerApplication()
  • Method Details

    • configure

      protected org.springframework.boot.builder.SpringApplicationBuilder configure(org.springframework.boot.builder.SpringApplicationBuilder application)
      Override the default SpringBootServletInitializer.configure() method, passing it this Application class.

      This is necessary to allow us to build a deployable WAR, rather than always relying on embedded Tomcat.

      See: http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#howto-create-a-deployable-war-file

      Overrides:
      configure in class org.springframework.boot.web.servlet.support.SpringBootServletInitializer
      Parameters:
      application - some builder.
      Returns:
      the builder, configured with DSpace sources and initializers.