Spring Data JPA and some basic principles of the use of (core concepts)

https://lufficc.com/blog/spring-boot-jpa-basic

How Repository Bean is created

Here Insert Picture Description

bugs

Transaction burst error is not turned on when 1.jpa use
Here Insert Picture Description
solution:
identify @Transactional statement on the call jpa

2 jpa custom query

Here Insert Picture Description
probably meant to say the query with named parameters, you need to provide the name of the method parameters used @param query method parameter is more than a sign of java8,

Solution: in front of the self-defined query parameters plus @Param
such as
From
bug: JPA java.lang.IllegalStateException: Queries with the For named the Parameters you need to use the Provide names

bug: Hibernate query error: org.hibernate.hql.internal.ast.QuerySyntaxException: XXX is not mapped

Learning:
Fuzzy query: How to Spring Data JPA fuzzy query (LIKE)?

SpringDataJPA of @Query with LIKE (JPA fuzzy query)

Published 81 original articles · won praise 19 · views 3625

Guess you like

Origin blog.csdn.net/c22cxz/article/details/104391827