How do I configure Undertow's MAX_PARAMETERS setting in Quarkus? - quarkus

I would like to configure Undertow’s MAX_PARAMETERS value in an application that uses the Quarkus MyFaces extension for JSF.
I could not find any application.properties settings that would be forwarded to Undertow, nor does there appear to be any API to customize the UndertowOptionMap. Is there a way to do it?

As of Quarkus 1.13.0, this be done by setting the quarkus.servlet.max-parameters configuration value.

Related

what does "spring-kafka without springboot" mean

I'm totally new to Kafka and terribly confused by this:
https://docs.spring.io/spring-kafka/reference/html/#with-java-configuration-no-spring-boot
I don't understand what that even means. What does "no spring boot mean" because that example sure as hell uses spring boot. I'm so confused....
EDIT
if I'm using SpringBoot and spring-kafka, should I have to manually create #Bean ConcurrentKafkaListenerContainerFactory as shown here. Most of the examples in the docs for setting up filtering / config / etc seem to use the "manual" configuration using #Bean. Is that "normal"? The docs are very confusing to me...especially this warning:
Spring for Apache Kafka is designed to be used in a Spring Application Context. For example, if you create the listener container yourself outside of a Spring context, not all functions will work unless you satisfy all of the …​Aware interfaces that the container implements.
It's referring to the autowired configuration, as compared to putting each property in the config via HashMap/Properties in-code.
Also, it does not use #SpringBootApplication or SpringApplication.run, it just calls a regular main method using a hard-coded Config class.
Spring boot contains the functionality of AutoConfiguration
What this means is that spring boot when discovers some specific jar dependencies it knows, in the project, it automatically configures them to work on a basic level. This does not exist in simple Spring project where even if you add the dependency you have to also provide the configuration as to how it should work in your application.
This is also happening here with dependencies of Kafka. Therefore the documentation explains what more you have to configure if you don't have spring-boot with auto-configuration to make kafka work in a spring project.
Another question asked in comment is what happens in case you want some complex custom configuration instead of the automatic configuration provided while you are in a spring-boot app.
As documented
Auto-configuration tries to be as intelligent as possible and will
back-away as you define more of your own configuration. You can always
manually exclude() any configuration that you never want to apply (use
excludeName() if you don't have access to them). You can also exclude
them via the spring.autoconfigure.exclude property.
So if you want to have some complex configuration which is not automatically provided by spring-boot through some other mechanism like a spring-boot specific application property, then you can make your own configuration with your custom bean and then either automatic configuration from spring-boot for that class will back of as spring does several intelligent checks during application context set up or you will have to exclude the class from auto configuration manually.
In that case you could probably take as an example reference of how to register manually your complex configurations in spring boot what is documented on how to be done in non spring boot app. doc

is it possible to change name of endpoint in spring boot actuator

is it possible to change name of endpoint in spring boot actuator. For example i want to rename env to myenv. I am unable to find any property spring boot 2 , we had endpoints.env.id in spring boot 1.x.
Please assist here
Yes , it's possible.
Add the following property and the path will be renamed.
management.endpoints.web.path-mapping.env=myenv
Make sure to enable actuator env in properties. Add env in web exposure inlcude list
management.endpoints.web.exposure.include=env
myenv will be available at /actuator/myenv unless you change actuator base path.
Tested with spring boot 2.3.4.RELEASE.
For further information look at the official docs here.

Spring cloud config server not honoring logging.file property and not logging external file

I'm using spring-boot-starter 2.3.3.RELEASE version. I'm running my spring cloud configuration server in native profile (looking for configuration files in file system). I added
logging.file = /var/log/config.log in application.properties file. But my application is not logging logs to this file.(All other microservices are logging to this location). Am I missing any additional settings for Spring cloud config server? Thank you so much for your help.
In the spring boot 2.3.3 RELEASE documentation the logging properties that specify where the location should be is indicated using the property:
logging.file.path={path}
The documentation:
https://docs.spring.io/spring-boot/docs/2.3.3.RELEASE/reference/htmlsingle/#boot-features-logging-file-output
This modification from logging.path to logging.file.path appears as a deprecation in Spring Boot 2.2:
https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.2-Release-Notes#deprecations-in-spring-boot-22
One way to do it with spring-boot application is, setting it from command line argument as default it will dump every thing on console.
logging.file=logs/test.log
Old school but far effective, save path in application.properties
logging.file=logs/test.log

How to set threshold of SlowQueryReport interceptor of Tomcat in Spring Boot properties

We need to configure SlowQueryReport Tomcat interceptor in our Spring boot application, specifically threshold value in properties files. Couldn't find anything on the web. Any help?
We used the old syntax (see below, note the given threshold) in the configuration file and it worked:
spring.datasource:
tomcat.jdbc-interceptors: org.apache.tomcat.jdbc.pool.interceptor.SlowQueryReport(threshold=10);any.other.tomcat.Interceptor

How to change the servlet mapping in JoinFaces?

The default servlet mapping in JoinFaces seems to be *.jsf.
How may I change it to a different mapping? I could not find a setting in Spring Boots application config file.
Starting from JoinFaces 3.1.0, it is possible to configure servlet mapping. See details.

Resources