Migrate Hibernate 5 to 6 with Spring Boot 2.7.x to 3

Done by myself.

package com.dmtlabs.aidocentserver.global.base;

import org.hibernate.boot.model.FunctionContributions;
import org.hibernate.boot.model.FunctionContributor;
import org.hibernate.type.StandardBasicTypes;

public class MySQLDBFunction implements FunctionContributor {

    @Override
    public void contributeFunctions(FunctionContributions functionContributions) {
        functionContributions.getFunctionRegistry().registerNamed(
                "ST_Distance_Sphere", functionContributions.getTypeConfiguration().getBasicTypeRegistry().resolve(StandardBasicTypes.DOUBLE)
        );
    }
}

application.properties (Spring Boot 3.1.0)

# JPA Configuration
spring.jpa.show-sql=true
spring.jpa.generate-ddl=true
spring.jpa.database=mysql
spring.jpa.properties.hibernate.function_contributor=com.dmtlabs.aidocentserver.global.base.MySQLDBFunction
spring.jpa.hibernate.ddl-auto=update
spring.jpa.properties.hibernate.default_batch_fetch_size=1000

(other configuration is irrelevant, setting spring.jpa.properties.hibernate.function_contributor is worked.)