slyak / spring-data-jpa-extra

spring data jpa with template dynamic query (eg: freemarker,velocity etc.) like mybatis. The master branch already support springboot2+ spring5+
Apache License 2.0
400 stars 116 forks source link

为什么不把SQL直接写在@TemplateQuery注解上呢? #43

Closed gbguanbo closed 5 years ago

gbguanbo commented 5 years ago

这样既可以避免方法名相同的问题,也无须再开发过程中切换 image image

stormning commented 5 years ago

是为复杂SQL设计的,复杂查询一般有很多行,写代码里看起来不方便,一般简单的原生就可以搞定了。

在 2019年2月26日,上午11:50,gbguanbo notifications@github.com 写道:

这样既可以避免方法名相同的问题,也无须再开发过程中切换 https://user-images.githubusercontent.com/804801/53386327-b41dd680-39bc-11e9-8140-ae880e81b28e.png 文件

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/slyak/spring-data-jpa-extra/issues/43, or mute the thread https://github.com/notifications/unsubscribe-auth/ADzFg0Atqesl1BF7NGPLhO1DB05gVxkOks5vRK8MgaJpZM4bRS8A.

cheng6563 commented 5 years ago

你真的觉得这种多行字符串很好看吗?