Configuring embedded Tomcat from Spring Boot - spring-boot

I'm searching about how to harden embedded tomcat according to CIS security Benchmark, how I can configure CATALINAHOME, BASE, and how can I configure the security manager with polices.
I did not find a flexible way to configure the embedded tomcat as stand-alone tomcat.
Any help regarding the customized of the embedded tomcat rather than the limited configuration in the applicaiton.properties .

Related

Enbedded Tomcat configuration in Spring boot

I was going through the tomcat configuration for embedded tomcat in spring boot doc, I was not able to get prestartminSpareThreads property for embedded tomcat. However this prestartminSpareThreads is available in tomcat documentation. Could you please help me with setting up this property in embedded tomcat?

Deploy Apache Camel on(with or without spring boot) on wildfly server

We have use case where we need to develop integration on Apache camel.
However, from deployment point of view we have Wildly server where so far we have deployed varous Java spring boot Microservices.
Also, wehave another environment where these Java spring boot service are deployed on Openshift inside JBoss EAP conatiner.
Now, quuestion is how can I deploy apache camel routes/jar in similar way on Wild fly or Joss.
Few options , I can think of but not sure hows it possible.Need technical guidance.
Options
1. Create camel jar and deploy on Widlfly- I dont know how it works.
2. Create apache camel integration using spring boot . As per documentation ,it will work . my question in how it will be deployed on widlfly or open shift.
Also, can I use spring DSL in that?

Spring boot and Tomcat : Is it better to use embeded Tomcat or external Tomcat installation.

I was wondering if some experienced spring boot users can tell us how to choose between embedded Tomcat and external Tomcat installation.
Thanks in advance.
Embedded Tomcat helps you to define Standalone application. Earlier we have to deploy war to Tomcat Server which itself a tedious task. From the embedded tomcat you can run application as service without worrying about the deployment thing. As now days microservices are being popular, spring boot is more popular because of its feature one of them is embedded servers like Tomcat,Jetty or Netty.

spring boot without web server but with management server

we have many services developed with spring boot, some are web services with a servlet container and some are services without a servlet container.
we don't use #EnableAutoConfiguration but we add only the auto configurations we need because our classpath is a mess and full auto configuration may create many beans we don't really need.
on services that don't need a servlet container we still want to have actuator and management server, so we register EndpointWebMvcAutoConfiguration but it has a condition on web application and does not create the management server.
of course i could just add EmbeddedServletContainerAutoConfiguration and just have a servlet container that does nothing but i don't like to do that.
Any idea how to cause spring boot to create the management server even on non web environment?
Thank you

Configure Jetty in Spring Boot using usual Jetty XML

Is there a simple way to use (or reuse) external Jetty configuration files to configure an embedded Jetty web container with Spring Boot.
Programmatic configuration to change only the listening port for example is acceptable, but a full configuration including multiple connectors, thread pools, etc. seems to be better suited with usual Jetty files.
Thanks for your help.
Regards.
There's no support in Spring Boot for configuring Jetty via XML. You can use application.properties for simpler cases or programmatic configuration for things that are more complex.
Boot's Tomcat integration is a little bit ahead of its Jetty integration in terms of what you can configure via application.properties. For example, you can configure Tomcat's thread pool. If you'd like to see some improvements to the Jetty integration then please open an issue, or, even better, a pull request.

Resources