Skip to content

dao.findOne(id)版本兼容issue #10

Open

Description

@Asucanc

jpa getAccountById 在更高版本中 findOne(id) 不对, 替换为 findById(id).get();

Activity

  1. peak-chen commented on Feb 19, 2020

    @peak-chen

    由于springboot的版本更新(我的2.2.4),这个地方可以改为如下参考:
    @RequestMapping(value = "/find", method = RequestMethod.PUT)
    public Optional getAccountById(@RequestParam(value = "id", required = true) int id) {
    return accountJpaDao.findById(id);
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions