您什么时候将 Spring Data JPA 用于 Spring Boot 和 JOOQ,反之亦然?
我知道 Spring Data JPA 可用于完成基本的 CRUD 查询,但不适用于复杂的连接查询,而使用 JOOQ 使其更容易?
编辑:您可以将 Spring 数据 jpa 与 jooq 一起使用吗?
我目前有一个带有 Express 后端的 NodeJS 应用程序,并且所有前端都是用 EJS 实现的。当前的示例路线如下所示:
router.get("/:name&:term", function(req, res) {
Course.find({ courseName: req.params.name, courseTerm: req.params.term }).populate("students")
.exec(function(err, foundCourse) {
if (err) {
console.log(err);
} else {
console.log(foundCourse)
res.render("courses/show", { course: foundCourse });
}
});
});
Run Code Online (Sandbox Code Playgroud)
我已经按照上面的示例路线实现了网站的许多页面。所以结构看起来像这样:
localhost:3000
-/courses
-/show
-/review
-/professors
-/show
-/rating
...
Run Code Online (Sandbox Code Playgroud)
但我最近参加了 React 课程,并希望将 React 用于新页面,例如localhost:3000/groups
有没有办法在某些页面上使用 React,并且仍然拥有我当前拥有的 EJS 页面?或者我是否必须将所有 EJS 页面重写为 React 组件?我对网络开发还很陌生,所以任何建议将不胜感激。
根据我的理解,我必须让 React 应用程序仅捕获某些请求/路由,但我不太确定该怎么做。
使用像这样的简单 tkinter gui:
import tkinter as tk
class Application(tk.Frame):
def __init__(self, master=None):
tk.Frame.__init__(self, master)
self.grid()
self.createWidgets()
def printHello(self):
print("Hello")
def createWidgets(self):
self.quitButton = tk.Button(self, text='Quit',
command=self.quit)
self.quitButton.grid(row=1,column=0)
self.printButton = tk.Button(self, text='Print',command=lambda: self.printHello())
self.printButton.grid(row=1,column=1)
app = Application()
app.master.title('Sample application')
app.mainloop()
Run Code Online (Sandbox Code Playgroud)
我试图按照此文档将事件循环与 ipython 笔记本的内核连接:https://ipython.org/ipython-doc/3/config/eventloops.html
但我似乎不太明白它是如何工作的:@register_integration('tk')
如何准确连接事件循环?如果我这样做,我可以用连接的事件循环做什么?
我一直在寻找自动完成组件的(https://material-ui.com/api/autocomplete/)API,但我似乎找不到一种方法(从我有限的 javascript 知识)只显示文本字段下方有一定数量的选项。
我正在尝试将搜索功能与超过 7,000 条数据结合起来,但我不想立即显示所有数据。如何将选项限制为最多 10 个建议?
据我所知,MyBatis 和 jOOQ 用于类似的情况。所以我想知道什么时候应该在 Spring 应用程序中使用 jOOQ 而不是 MyBatis,以及每个库和框架在开发时带来的技术优缺点。
如果有人已经熟练使用 MyBatis 这样的框架编写 SQL 查询,那么切换到 jOOQ 会给他们带来什么技术优势(查询运行时、编译时错误)?
javascript ×2
jooq ×2
reactjs ×2
spring ×2
database ×1
ejs ×1
event-loop ×1
express ×1
ipython ×1
java ×1
material-ui ×1
mybatis ×1
node.js ×1
python ×1
spring-boot ×1
spring-data ×1
tkinter ×1