2020
10-10
10-10
Spring boot JPA实现分页和枚举转换代码示例
1.实现分页方法一:使用Pageable使用Pageable作为入参传入Repository,返回值用Page<T>接收UserRepositorypackagecom.kinglead.demo.dao;importcom.kinglead.demo.entity.User;importorg.springframework.data.jpa.repository.JpaRepository;publicinterfaceUserRepositoryextendsJpaRepository<User,Long>{}UserServiceImplpackagecom.kinglead.demo.service.impl;importcom.kinglead.de...
继续阅读 >