Using Spring @Procedure to call StoredProcedure without binding to a table

会有一股神秘感。 提交于 2019-12-02 11:56:27

Repositories are based on the Domain Driven Design concept of Repository: An object that behaves similarly to a collection of aggregate roots but with the content stored in some persistent store. Therefore a Repository needs to know the aggregate root it is responsible for and also it's id type in order to find it in the store.

For JPA Repositories this means the aggregate has to be an entity mapped by JPA. It would certainly be possible to implement Repositories based on POJO entities and backed by stored procedures. Nothing wrong with that idea except that it is not a common use case and for your use case probably overkill.

If you just want to call a stored procedure you are probably better of with a simple Spring bean and a JdbcTemplate.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!