问题描述
有人知道是否存在用于Java的框架,而我无需实现DAO,但我只需要定义接口即可,并且它就像Groovy实体一样工作?
例如,命名方法 findByPrimaryKey ,它将自动检测主键并执行正确的操作.
我不确定,但是我记得我在Spring中看到过类似的东西...我错了吗?
您可能想看一下Spring Data-JPA项目.它具有与您所需类似的功能.在此处中查看其页面.
这是一个链接为其查询方法.它认为这就是您要寻找的. p>
Do someone know if there exists a framework for java where I don't have to implement the DAO but I need just to define the interface and it works like the groovy entities?
For example naming a method findByPrimaryKey it will autodetect the primary key and do the right thing.
I'm not sure but I remember I have seen something like this with Spring...Am I wrong?
You may want to take a look at the Spring Data-JPA project . It has similar features to what you need . See their page here.
Here's a link to their query methods . It think this is what you're looking for .
这篇关于Java orm框架的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!