摘要: User entity: import javax.validation.constraints.*; @Entity public class User { @Id private int id; @Size(min = 6, message = "Username cannot be less 阅读全文
posted @ 2021-01-12 20:54 Zhentiw 阅读(86) 评论(0) 推荐(0)
摘要: @Repository public interface ProductRepository extends CrudRepository<Product, Integer> { @Query("select p from Product p where p.name like %:name%") 阅读全文
posted @ 2021-01-12 15:49 Zhentiw 阅读(156) 评论(0) 推荐(0)