Registering FunctionContributor in Spring Boot without META-INF/services

I’m working on a Spring Boot 3 application with Hibernate 6 and I need to register custom SQL functions using FunctionContributor.

The standard approach is using Java SPI with META-INF/services/org.hibernate.boot.model.FunctionContributor, but our team convention is to keep all configuration in code (beans, @Configuration classes).

Is there a way to register a FunctionContributor programmatically in Spring Boot?
Thanks!

This is the Hibernate ORM forum, not a Spring forum, so please direct this question elsewhere.

1 Like