I’m not sure it is possible with repository methods naming but you can use @Query
like
(:parameterOne is null or parameter1 = :parameterOne) and (:parameterTwo is null or parameter2 = :parameterTwo)
More Related Contents:
- Spring Boot – Loading Initial Data
- Spring boot – Not a managed type
- Disable all Database related auto configuration in Spring Boot
- No property found for type… custom Spring Data repository
- Can’t Autowire @Repository annotated interface in Spring Boot
- Spring Boot and how to configure connection details to MongoDB?
- Configure Multiple MongoDB repositories with Spring Data Mongo
- Spring Boot Data JPA – Modifying update query – Refresh persistence context
- With Spring Data REST, why is the @Version property becoming an ETag and not included in the representation?
- Spring Boot not serving static content
- Spring Boot, Spring Data JPA with multiple DataSources
- Spring @PropertySource using YAML
- Springboot/Angular2 – How to handle HTML5 urls?
- How to java-configure separate datasources for spring batch data and business data? Should I even do it?
- Where to put static files such as CSS in a spring-boot project?
- implement dynamically datasource in spring data jpa
- Spring Batch With Annotation and Caching
- Spring boot and SQLite
- How to conditionally declare Bean when multiple profiles are not active?
- Spring boot how to read properties file outside jar
- How to configure rolling file appender within Spring Boot’s application.yml
- Escaping a dot in a Map key in Yaml in Spring Boot
- Spring batch scope issue while using spring boot
- How to pass system property to Gradle task
- @RequestBody is getting null values
- How to prevent Spring Boot daemon/server application from closing/shutting down immediately?
- How to allow a User only access their own data in Spring Boot / Spring Security?
- Spring – How to stream large multipart file uploads to database without storing on local file system [duplicate]
- java 9 module reads package X from A and B
- How to apply Spring Data projections in a Spring MVC controllers?