Skip to content

Commit

Permalink
Removed features from mongotemplate.
Browse files Browse the repository at this point in the history
  • Loading branch information
davidorellana98 committed Dec 29, 2022
1 parent 1dca7bb commit 53bac12
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

public interface BookingMongoRepository extends MongoRepository<Booking, String> {

@Query(value = "{'bookingType' : ?0}", exists = true)
//@Query(value = "{'bookingType' : ?0}", exists = true)
List<Booking> findBookingsByBookingType(String bookingType);

@Query(value = "{'paymentMethods' : ?0}", exists = true)
//@Query(value = "{'paymentMethods' : ?0}", exists = true)
List<Booking> findBookingsByPaymentMethods(String paymentMethods);
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@

public interface UserMongoRepository extends MongoRepository<User, String> {

@Query(value = "{'name' : ?0, 'lastName' : ?1}", exists = true)
// @Query(value = "{'name' : ?0, 'lastName' : ?1}", exists = true)
List<User> findUserByNameAndLastName(String name, String lastName);

@Query(value = "{'email' : ?0}")
// @Query(value = "{'email' : ?0}")
Optional<User> findUserByEmail(String email);

@Query(value = "{'identityCard' : ?0}")
// @Query(value = "{'identityCard' : ?0}")
Optional<User> findUserByIdentityCard(String identityCard);
}
4 changes: 0 additions & 4 deletions src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Configuration for MongoDB
spring.data.mongodb.uri=${MONGODB_URI_CLUSTER}
spring.data.mongodb.database=${DATA_BASE}
logging.level.org.springframework.data.mongodb.core.MongoTemplate=DEBUG
logging.level.org.springframework.data.mongodb.repository.Query=DEBUG
spring.data.mongodb.auto-index-creation=true
spring.mvc.pathmatch.matching-strategy=ant_path_matcher
spring.data.mongodb.host=hostIpOnWhichMongoIsRunning
spring.data.mongodb.port=27017
KEY_SECRET=${KEY_SECRET}

0 comments on commit 53bac12

Please sign in to comment.