課程
/后端開發(fā)
/Java
/SpringMVC數(shù)據(jù)綁定入門
為什么集合綁定不設(shè)計成直接傳List,還要作為另外一個對象的屬性....?
2016-04-23
源自:SpringMVC數(shù)據(jù)綁定入門 5-1
正在回答
springMVC 不支持list類型的直接轉(zhuǎn)換,需包裝成object。
qq_王翊_0 提問者
為什么我的數(shù)據(jù)綁定會出現(xiàn)這個錯誤啊?請求是
http://localhost:8080/list.do?users[0].name=zhangsan
?Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
?java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:467)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:294)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
springMVC中,List需要綁定在對象上,而不能直接寫在Controller方法的參數(shù)中。
舉報
Geely帶你認識SpringMVC各種數(shù)據(jù)綁定,學(xué)習(xí)相關(guān)注解的使用
1 回答不論是綁定list還是map都返回400錯誤啊
1 回答數(shù)據(jù)綁定的時候我傳一個空值給后臺,該字段為date類型
1 回答這種綁定list的接口如果是get請求的url,豈不是很容易被攻擊?
1 回答方法和屬性的對應(yīng)關(guān)系
2 回答真正數(shù)據(jù)綁定的時候不應(yīng)該是前臺頁面form表單是數(shù)據(jù)傳過去的嗎,又應(yīng)該怎么綁定呢?
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號-11 京公網(wǎng)安備11010802030151號
購課補貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號
2016-04-23
springMVC 不支持list類型的直接轉(zhuǎn)換,需包裝成object。
2018-12-22
為什么我的數(shù)據(jù)綁定會出現(xiàn)這個錯誤啊?請求是
?Note: further occurrences of HTTP request parsing errors will be logged at DEBUG level.
?java.lang.IllegalArgumentException: Invalid character found in the request target. The valid characters are defined in RFC 7230 and RFC 3986
at org.apache.coyote.http11.Http11InputBuffer.parseRequestLine(Http11InputBuffer.java:467)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:294)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:770)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1415)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
2016-04-23
springMVC中,List需要綁定在對象上,而不能直接寫在Controller方法的參數(shù)中。