Posts

Showing posts with the label Spring boot

Embedded Tomcat Server configuration in Spring boot application

To modify the default configuration of Spring boot embedded Tomcat server, we can make use of below properties ·        Server.port=80 If you wish to change the port number ·        Server.address=my_custom_ip   IP address where the server would listen ·        By default spring boot provides standard error web page. This page is called white label. It’s enabled by default but if we want to disable it using Server.error.whitelabel.enabled=false ·        Default path of whitelabel is /error but it can be customized using Server.error.path=/user-error ·        To limit the number of simultaneous requests made to the server, use server.tomcat.threads.max=200 ·        Server connection timeout using server.connection-timeout=5s ·        Define max size of request header   server.max-http-header-size=8KB ·        Define max size of request body server.tomcat.max-swallow-size=2MB ·        Define max size of whole post request server.tomcat.max-http-post-size=2MB ·        To