最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Using `JdbcTemplate` with `@Table` Entities in Spring Data JDBC Without a Custom `RowMapper` - Stack Overflow

programmeradmin6浏览0评论

I use spring-data-jdbc and have mapped my DB tables with .springframework.data.relational.core.mapping.Table.

I also have some custom queries with .springframework.data.jdbc.repository.query.Query in use which use these @Table entities as return-value.

I would now like to replace one of these custom queries with .springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate to achieve more freedom for more complex queries.

Is it possible to achieve this without the additional implementation of an .springframework.jdbc.core.RowMapper for the JdbcTemplate? Can I use the @Table class of spring-data-jdbc and its internal mapping directly here?

Does spring-data-jdbc also use the JdbcTemplate internally?

发布评论

评论列表(0)

  1. 暂无评论