有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

在Spring的JPA查询中,用java问号代替unicode(印地语)字符?

我在JPA查询的where子句中使用印地语字符。当我使用show jpa在connsole中打印查询时,字符被替换为

我用过

value="${jdbc.url};databaseName=${jdbc.databaseName};useUnicode=true;characterEncoding=UTF-8" 

在jdbc url中,但这并不能解决问题

在控制台输出之后

Hibernate: select facilitysc0_.blockId as col_0_0_, formxpaths1_.xPath as col_1_0_, formxpaths1_.label as col_2_0_, formxpaths1_.formXpathScoreId as col_3_0_, case when ?='all' then case when formxpaths1_.xPath not in (? , ? , ? , ?) then CONVERT(float, count(case when facilitysc0_.score='???' then 1 end))/CONVERT(float, count(case when facilitysc0_.score='???' or facilitysc0_.score='????' or facilitysc0_.score='???? ????' or facilitysc0_.score='' then 1 end))*100 else CONVERT(FLOAT, count(case when facilitysc0_.score='???' then 1 end))/CONVERT(FLOAT, count(case when facilitysc0_.score='???' or facilitysc0_.score='????' then 1 end))*100 end else CONVERT(FLOAT, count(case when facilitysc0_.score='???' then 1 end))/CONVERT(FLOAT, count(case when facilitysc0_.score='???' or facilitysc0_.score='????' then 1 end))*100 end as col_4_0_, case when ?='all' then count(case when facilitysc0_.score='???' or facilitysc0_.score='????' or facilitysc0_.score='???? ????' or facilitysc0_.score='' then 1 end) else count(case when facilitysc0_.score='???' or facilitysc0_.score='????' then 1 end) end as col_5_0_, count(case when facilitysc0_.score='???' then 1 end) as col_6_0_ from FacilityScore facilitysc0_ inner join FormXpathScoreMapping formxpaths1_ on facilitysc0_.formXpathScoreId=formxpaths1_.formXpathScoreId inner join LastVisitData lastvisitd2_ on facilitysc0_.lastVisitDataId=lastvisitd2_.LastVisitDataId where formxpaths1_.formId=? and (formxpaths1_.type like 'select_one yes_no%') and ((facilitysc0_.score in (? , ?)) and (formxpaths1_.xPath in (? , ? , ? , ?)) or (facilitysc0_.score in (? , ? , ? , ?)) and (formxpaths1_.xPath not in (? , ? , ? , ?)) and ?='all' or facilitysc0_.score in (? , ?)) and (lastvisitd2_.DateOfVisit between ? and ?) and lastvisitd2_.IsLive=1 group by facilitysc0_.blockId , formxpaths1_.xPath , formxpaths1_.label , formxpaths1_.formXpathScoreId

请帮忙


共 (0) 个答案