java.sql.SQLException: Invalid column index using jdbcTemplate

后端 未结 1 766
挽巷
挽巷 2021-01-21 11:56

I\'m a newbie JAVA. I have a config file

    


        
相关标签:
1条回答
  • 2021-01-21 12:31

    You are using queryForObject(java.lang.String, java.lang.Object[], java.lang.Class) , which expects an array of objects to bind to a PreparedStatement type query with placeholders.

    Your query is probably missing placeholders, e.g :

    select a.firstname from TEST a where id = ?
    

    You get errors about invalid column indexes, because the content of your array cannot currently be mapped to any placeholders indexes.

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