Skip to content

Commit

Permalink
Merge pull request #155 from imi-ms/152-increase-spring-webdatabinder…
Browse files Browse the repository at this point in the history
…-size

Added larger form size to RootController
  • Loading branch information
ywarnecke authored Jan 23, 2025
2 parents 1673220 + da75f72 commit fe4bd0d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/main/java/de/imi/mopat/controller/RootController.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
import jakarta.servlet.ServletContext;
import jakarta.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.ModelAttribute;

import java.util.HashMap;
Expand Down Expand Up @@ -34,7 +36,16 @@ public class RootController {

@Autowired
private ServletContext context;


/**
* Globally set Form limit to more than 256
* @param binder
*/
@InitBinder
public void initBinder(WebDataBinder binder) {
binder.setAutoGrowCollectionLimit(2058);
}

/**
* Adding the parameterHelper to all pages.
*
Expand Down

0 comments on commit fe4bd0d

Please sign in to comment.