課程
/后端開(kāi)發(fā)
/Java
/SpringMVC數(shù)據(jù)綁定入門(mén)
為什么集合綁定不設(shè)計(jì)成直接傳List,還要作為另外一個(gè)對(duì)象的屬性....?
2016-04-23
源自:SpringMVC數(shù)據(jù)綁定入門(mén) 5-1
正在回答
springMVC 不支持list類(lèi)型的直接轉(zhuǎn)換,需包裝成object。
qq_王翊_0 提問(wèn)者
為什么我的數(shù)據(jù)綁定會(huì)出現(xiàn)這個(gè)錯(cuò)誤???請(qǐng)求是
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需要綁定在對(duì)象上,而不能直接寫(xiě)在Controller方法的參數(shù)中。
舉報(bào)
Geely帶你認(rèn)識(shí)SpringMVC各種數(shù)據(jù)綁定,學(xué)習(xí)相關(guān)注解的使用
1 回答不論是綁定list還是map都返回400錯(cuò)誤啊
1 回答數(shù)據(jù)綁定的時(shí)候我傳一個(gè)空值給后臺(tái),該字段為date類(lèi)型
1 回答這種綁定list的接口如果是get請(qǐng)求的url,豈不是很容易被攻擊?
1 回答方法和屬性的對(duì)應(yīng)關(guān)系
2 回答真正數(shù)據(jù)綁定的時(shí)候不應(yīng)該是前臺(tái)頁(yè)面form表單是數(shù)據(jù)傳過(guò)去的嗎,又應(yīng)該怎么綁定呢?
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢(xún)優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2016-04-23
springMVC 不支持list類(lèi)型的直接轉(zhuǎn)換,需包裝成object。
2018-12-22
為什么我的數(shù)據(jù)綁定會(huì)出現(xiàn)這個(gè)錯(cuò)誤???請(qǐng)求是
?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需要綁定在對(duì)象上,而不能直接寫(xiě)在Controller方法的參數(shù)中。