RonPringadi
RonPringadi

Reputation: 1494

How to modify Wildfly/JBoss config using Spring Boot

I'm migrating a Spring MVC web application to a Spring Boot. The build (maven) generates a .war file then I upload it to Wildfly Server. I used to be able to upload large file now it doesn't work.

On the old way, using Spring MVC, I updated the Wildfly' server config itself /standalone/configuration/standalone-full.xml which no longer work after switching to Spring Boot

<http-listener name="default" socket-binding="http" max-post-size="304857600" redirect-socket="https" enable-http2="true"/>

So the config above says allow posting files up to ~300MB (see the 304857600)

How to modify Wildfly/JBoss config using Spring Boot?

My google search was redirected here by some user comment, but still unsure how to do it in Spring Boot https://docs.jboss.org/author/display/WFLY10/Undertow+subsystem+configuration

I'm on:

Upvotes: 0

Views: 1766

Answers (1)

Amith Kumar
Amith Kumar

Reputation: 4884

SpringBoot ask to setup these two additional config parameter to control the size limits of file upload/post request. I am certain that's causing the limitation in your case, if your Wildfly server is configured to not limit it.

#Max file size.
spring.servlet.multipart.max-file-size
#Max Request Size
spring.servlet.multipart.max-request-size

Reference: SpringBoot guide for file upload feature.

Upvotes: 1

Related Questions