Spring Boot + postman中使用jooq进行CRUD操作

问题描述 投票:0回答:1
@RestController
public class BookController {

    
    @Autowired
    BookService bookService;
    
    @PostMapping("/saveBook")
    public void postBook(@RequestBody Book book) {
        
        this.bookService.insertBook(book);
    }
    
    
     @GetMapping("/allBooks")
     public Result<Record> getBooks(){
            return this.bookService.getBooks();
        }
}

我正在尝试在 Spring Boot 中使用 jooq+postgresql 执行增删改查操作,从邮递员调用 API。但它不起作用。请分享一些链接和您的想法。

I am sending the JSON object from postman but is not convert in the book object.

postgresql spring-boot postman jooq
1个回答
0
投票

您能否与我们分享该方法的定义

insertBook(book)
,并提供您在Postman中的错误截图,提前谢谢。

© www.soinside.com 2019 - 2024. All rights reserved.