Fix exception message for JpaExecutor.doPoll()

Signed-off-by: Jiandong Ma <jiandong.ma.cn@gmail.com>

[artem.bilan@broadcom.com Improve commit message]

Fixes: #9997

The `nativeQuery` has to be mention in the possible required options to configure.

**Auto-cherry-pick to `6.4.x` & `6.3.x`**
This commit is contained in:
Jiandong
2025-04-28 23:55:01 +08:00
committed by GitHub
parent dd9db176bb
commit 119209d1ad
2 changed files with 4 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2023 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -569,7 +569,7 @@ public class JpaExecutor implements InitializingBean, BeanFactoryAware {
else {
throw new IllegalStateException("For the polling operation, one of "
+ "the following properties must be specified: "
+ "query, namedQuery or entityClass.");
+ "jpaQuery, nativeQuery, namedQuery or entityClass.");
}
return payload;
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 the original author or authors.
* Copyright 2002-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -75,7 +75,7 @@ public class JpaExecutorTests {
.isThrownBy(jpaExecutor::poll)
.withMessage("For the polling operation, one of "
+ "the following properties must be specified: "
+ "query, namedQuery or entityClass.");
+ "jpaQuery, nativeQuery, namedQuery or entityClass.");
}
@Test