Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException:

后端 未结 2 1093
面向向阳花
面向向阳花 2021-01-03 00:04

I was trying to get data from a MySQL database using the Spring utility ResultSetExtractor, but I got the following exception:

Exception in thre         


        
2条回答
  •  我在风中等你
    2021-01-03 00:24

    The problem is in



    Try changing the name="jdbcTemplate" to name="template". Since you have given name as jdbcTemplate spring will search for a setter method with name setJdbcTemplate() in EmployeeDao class, but the acutal method you have is setTemplate()

提交回复
热议问题