Created
February 11, 2013 12:45
-
-
Save banterCZ/4754235 to your computer and use it in GitHub Desktop.
Fix of java.lang.IndexOutOfBoundsException using Spring MVC.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.stereotype.Controller; | |
import org.springframework.web.bind.WebDataBinder; | |
import org.springframework.web.bind.annotation.InitBinder; | |
/** | |
* @author banterCZ | |
*/ | |
@Controller | |
public class MyController { | |
@Value("${myApplication.autoGrowCollectionLimit:1000}") | |
private int autoGrowCollectionLimit; | |
/** | |
* {@link org.springframework.validation.DataBinder#DEFAULT_AUTO_GROW_COLLECTION_LIMIT} is only 256, | |
* but there are much more items. | |
* @param dataBinder | |
*/ | |
@InitBinder | |
public void initBinder(WebDataBinder dataBinder) { | |
dataBinder.setAutoGrowCollectionLimit(autoGrowCollectionLimit); | |
} | |
//TODO | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
thank you. I have resolved in your favor.