Skip to end of metadata
Go to start of metadata

This guide explains how to configure and run MidPoint with embedded Tomcat.

This feature is available since MidPoint version 3.7. No configuration changes needed in case you want to run MidPoint WAR inside standard Tomcat.

This feature is based on spring libraries, especially spring boot framework. Libraries used:

  • boot - 1.5.8.RELEASE

  • spring - 4.3.12.RELEASE
  • security - 4.2.3.RELEASE

Configuration

MidPoint configuration is done as usual in config.xml file located in midpoint.home. Configuration for embedded tomcat can be done in two places. Default configuration file name application.yml is located on classpath (admin-gui/src/main/resources folder). Custom configuration file application.yml can be placed to midpoint.home folder. Following table shows list of available properties that can be used to cofnigure tomcat (e.g. http/https ports, session timeouts, logging, max-post-size, etc.).

Available properties

Full list of properties is available here.

Web descriptor - web.xml was removed, all servlets and filters are registered/defined using servlet api in MidPointSpringApplication.java.

Configuration example 1

Configuration example 1: application.yml

Configuration example 2

Configuration example 2: application.yml

Other configuration

  • Web security configuration
    • defined in WebSecurityConfig.java
      • ctx-web-security-*.xml contexts are still available, but not used
    • cas and ldap configuration not available now (needs to be finished)
  • Banner (midpoint logo in logs)
    • used spring boot standard banner.txt file
  • static files moved to src/main/resources/static (default for spring boot) 

JDBC Drivers

Currently midPoint bundles only PostgreSQL and H2 jdbc driver. If one wants to deploy standalone midPoint with different database, then jdbc driver must be copied to midpoint.home/lib .

Executable Jar Start/Stop

Example command with minimum options (memory and midpoint.home configuration) using midpoint.war from dist/target folder:

Start command example

Other options can be added from list of properties (table above) using -D option, e.g. -Dserver.port=12345. Options explicitly stated in command will override defaults located in midpoint.home/application.yml.

Using midPoint with embedded Tomcat

Use the default URL (modify hostname and port as required): http://localhost:8080/

Autoconfiguration

MidPoint web applicaiton is autoconfigured by using the com.evolveum.midpoint.web.boot.MidPointSpringApplication class as a starting point. Spring boot will process all the annotated methods of this class in a "configuration code" approach. Additional autocofiguration classes are also used. Those are listed in the @ImportAutoConfiguration annotation.

Autoconfiguration is used as a replacement for JEE deployment descriptor (web.xml). E.g. servlets and servlet mappings are initialized in the MidPointSpringApplication class.

TODO

  • Redirect from / to /midpoint
  • Servelt for static content

See Also

  • No labels