Exclude javax.inject and CouchbaseAnnotationProcessor to exit gracefully without. (#1934)

CouchbaseAnnotationProcessor will provide a warning and skip generation
if javax.inject is not present.
This commit is contained in:
Michael Reiche
2024-04-10 17:35:27 -07:00
committed by GitHub
parent 25aaac47e2
commit a7ccfb314a
5 changed files with 73 additions and 14 deletions

View File

@@ -1329,7 +1329,7 @@ class CouchbaseTemplateKeyValueIntegrationTests extends JavaIntegrationTests {
MutationToken mt = couchbaseTemplate.getCouchbaseClientFactory().getDefaultCollection()
.upsert(id, JsonObject.create().put("id", id)).mutationToken().get();
Stream<User> users = couchbaseTemplate.rangeScan(User.class).consistentWith(MutationState.from(mt))
/*.withSort(ScanSort.ASCENDING)*/.samplingScan(5l, null);
/*.withSort(ScanSort.ASCENDING)*/.samplingScan(5l, (Long)null);
List<User> usersList = users.toList();
assertEquals(5, usersList.size(), "number in sample");
for (User u : usersList) {

View File

@@ -90,7 +90,7 @@ class QueryCriteriaTests {
@Test
void testNestedNotIn() {
QueryCriteria c = where(i("name")).is("Bubba").or(where(i("age")).gt(12).and(i("country")).is("Austria"))
.and(where(i("state")).notIn(new String[] { "Alabama", "Florida" }));
.and(where(i("state")).notIn( "Alabama", "Florida" ));
JsonArray parameters = JsonArray.create();
assertEquals(" ( (`name` = $1) or (`age` > $2 and `country` = $3)) and (not( (`state` in $4) ))",
c.export(new int[1], parameters, null));

View File

@@ -30,7 +30,7 @@ import org.springframework.stereotype.Repository;
*/
@Repository
public interface BigAirlineRepository extends CouchbaseRepository<BigAirline, String>,
QuerydslPredicateExecutor<BigAirline>, DynamicProxyable<BigAirlineRepository> {
DynamicProxyable<BigAirlineRepository> {
@Query("#{#n1ql.selectEntity} where #{#n1ql.filter} and (name = $1)")
List<Airline> getByName(@Param("airline_name") String airlineName);