Autowire Objectmapper in RowMapper
问题 I found answers say it possible to autowire inside rowmapper, If you want ScoreMapper instances to have ScoreCreator scoreCreator be injected with a Spring bean, the ScoreMapper instance itself must be a Spring bean, ie. created and managed by Spring Or by adding @Component You can define PersonUtility class as spring bean adding @component over the class. But currently RowMapper is instantiated with new in jdbcTemplate.query : jdbcTemplate.query(SQL, new Object[] {}, new MyRowMapper()) And I