Problem Description:
First, using the 1.11 version of spring data JPA, you can use the findone () method to query by ID
Then I used version 2.0.5 and found that the findone() method reported an error and could not be used to query by ID
When the findbyid (ID) is used for query and the page uses thymeleaf to receive the data from the controller, the page reception fails
Solution:
Use findById(id).get() to perform the query.