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
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.).
Full list of properties is available here.
Web descriptor -
web.xml was removed, all servlets and filters are registered/defined using servlet api in
server.port: 8088 server.servlet.session.timeout: 60m server.servlet.context-path: /idm
server: port: 8088 servlet: context-path: /idm session: timeout: 60m
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
Example command with minimum options (memory and midpoint.home configuration) using
java -Xms768m -Xmx2048m -Dmidpoint.home=/opt/midpoint-home -Dmidpoint.nodeId=node1 -jar midpoint.war
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
Use the default URL (modify hostname and port as required): http://localhost:8080/
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.