how to bind a list of tuples using Spring JDBCTemplate?

前端 未结 1 611
故里飘歌
故里飘歌 2021-02-14 21:38

I have some queries like this:

List listOfIntegers = Arrays.asList(new Integer[] {1, 2, 3});
List objects = 
    namedParameterJdbcTemplate.query(\"select * from         


        
相关标签:
1条回答
  • 2021-02-14 22:05

    I have debugged Spring code and found that it expects tuples to be provided as Object[], so for it to work with a List it should be a List<Object[]>.

    0 讨论(0)
提交回复
热议问题