0

ブラウザ経由でリクエストhttp://xxxx.com/test/?app_idx=80を送信します。

しかし、ibatisはこれを間違って解析します。

select
    CONCAT('http://localhost:8080/apps/icon/download/?app=', app_idx)
from test
where app_idx = ?;

私のクエリは

select
    CONCAT('http://localhost:8080/apps/icon/download/?app=', app_idx)
from test
where app_idx = **80**;

しかし、実際は「http:// localhost:8080 / apps / icon / download /?app=80」でした。

select
    CONCAT('http://localhost:8080/apps/icon/download/80app=', app_idx)
from test
where app_idx = **?**;

それを正しくする方法はありますか?

4

1 に答える 1

1

使用する

select CONCAT('?', app_idx)
from test
where app_idx = ?;

合格します

http://localhost:8080/apps/icon/download/?app=

最初のパラメータとして。

于 2012-06-01T06:00:15.723 に答える