0
是否可以使用spring-data-rest而不使用spring-data-jpa?使用spring-data-rest而不使用jpa,但只使用JdbcTemplate
在我的應用程序中,我使用JdbcTemplate。這可以以某種方式連線到spring-data-rest?
是否可以使用spring-data-rest而不使用spring-data-jpa?使用spring-data-rest而不使用jpa,但只使用JdbcTemplate
在我的應用程序中,我使用JdbcTemplate。這可以以某種方式連線到spring-data-rest?
不,它不能。從introduction section of the documentation:
春季數據REST服務建立在Spring數據倉庫的頂部,並自動導出這些爲REST資源
如果您使用JdbcTemplate
爲你的數據訪問,而不是使用Spring的數據存儲庫(無論是JPA還是任何其他支持的後端),那麼Spring Data REST就不會構建和導出爲REST資源。
但是如果你使用jdbcTemplate實現Repository接口,應該可以吧?我喜歡它,但迄今爲止沒有成功... – miran