Update data.adoc
No need to declare the method that create a bean as a public, and no need to declare interface that extends PagingAndSortingRepository with @Repository Signed-off-by: ayoub anbara <anbara.ayoub@gmail.com>
This commit is contained in:
parent
262a0abfb3
commit
8167022ada
|
|
@ -16,7 +16,7 @@ Java::
|
||||||
[source,java,role="primary"]
|
[source,java,role="primary"]
|
||||||
----
|
----
|
||||||
@Bean
|
@Bean
|
||||||
public SecurityEvaluationContextExtension securityEvaluationContextExtension() {
|
SecurityEvaluationContextExtension securityEvaluationContextExtension() {
|
||||||
return new SecurityEvaluationContextExtension();
|
return new SecurityEvaluationContextExtension();
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
@ -50,7 +50,6 @@ Java::
|
||||||
+
|
+
|
||||||
[source,java,role="primary"]
|
[source,java,role="primary"]
|
||||||
----
|
----
|
||||||
@Repository
|
|
||||||
public interface MessageRepository extends PagingAndSortingRepository<Message,Long> {
|
public interface MessageRepository extends PagingAndSortingRepository<Message,Long> {
|
||||||
@Query("select m from Message m where m.to.id = ?#{ principal?.id }")
|
@Query("select m from Message m where m.to.id = ?#{ principal?.id }")
|
||||||
Page<Message> findInbox(Pageable pageable);
|
Page<Message> findInbox(Pageable pageable);
|
||||||
|
|
@ -61,7 +60,6 @@ Kotlin::
|
||||||
+
|
+
|
||||||
[source,kotlin,role="secondary"]
|
[source,kotlin,role="secondary"]
|
||||||
----
|
----
|
||||||
@Repository
|
|
||||||
interface MessageRepository : PagingAndSortingRepository<Message,Long> {
|
interface MessageRepository : PagingAndSortingRepository<Message,Long> {
|
||||||
@Query("select m from Message m where m.to.id = ?#{ principal?.id }")
|
@Query("select m from Message m where m.to.id = ?#{ principal?.id }")
|
||||||
fun findInbox(pageable: Pageable): Page<Message>
|
fun findInbox(pageable: Pageable): Page<Message>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue