-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow configuration of QueryEngine
for Map repositories
#576
Comments
We intentionally switched to a @Bean
KeyValueTemplate mapKeyValueTemplate() throws ReflectiveOperationException {
Class<QueryEngine<? extends KeyValueAdapter, ?, ?>> spelQueryEngineClass = (Class) Class.forName("org.springframework.data.keyvalue.core.SpelQueryEngine");
MapKeyValueAdapter adapter = new MapKeyValueAdapter(BeanUtils.instantiateClass(spelQueryEngineClass));
return new KeyValueTemplate(adapter);
} With the switch, we missed to update the documentation. |
Thank you Mark. Speaking for us, we won't be using reflection and will switch our code so it uses the Thanks, feel free to close this issue, or use it as the vehicle to update the documentation. |
I'm going to take the issue to the team. We might make the query engines public classes to offer some choice. Also, we need to consider how one would configure query engines. SpEL isn't a bad choice, it is more that a |
We are going to introduce means for configuring the Query Engine, likely through an |
QueryEngine
for Map repositories
EnableMapRepositories now accepts a QueryEngineFactory to configure the QueryEngine and allows configuring the QueryCreator. Closes #576
Hello, our code started to fail with
UncategorizedKeyValueException
after upgrading to Spring Boot 3.3.0:It turns out that the
SpelQueryEngine
is no longer used by default (despite the documentation saying so according to my reading). Also, I don't know how to configure this engine.I have an example project at https://github.com/smurf667/demo-keyvalue which demonstrates the issue. Run
mvn spring-boot:run
to see the exception. Uncomment the older version 3.2.6 to make this work.The text was updated successfully, but these errors were encountered: