Commit 179467bd authored by Stephane Nicoll's avatar Stephane Nicoll

Make HazelcastJpaDependencyAutoConfiguration public

If Both Hazelcast and Hibernate are available, Spring Boot takes the
opinion that Hazelcast can be used for 2nd level caching and therefore
need to start before Hibernate.

Unfortunately, some users require Hibernate in some of their hazelcast
use case so the link is actually reversed. One way for such user is to
disable the auto-configuration that deals with this link. This class is
now public so that users can locate them and exclude them if necessary.

Closes gh-4960
parent 5e5542f0
/* /*
* Copyright 2012-2015 the original author or authors. * Copyright 2012-2016 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -37,13 +37,14 @@ import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean; ...@@ -37,13 +37,14 @@ import org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean;
* the {@code hazelcastInstance} bean. * the {@code hazelcastInstance} bean.
* *
* @author Stephane Nicoll * @author Stephane Nicoll
* @since 1.3.2
*/ */
@Configuration @Configuration
@ConditionalOnClass({ HazelcastInstance.class, @ConditionalOnClass({ HazelcastInstance.class,
LocalContainerEntityManagerFactoryBean.class }) LocalContainerEntityManagerFactoryBean.class })
@AutoConfigureAfter({ HazelcastAutoConfiguration.class, @AutoConfigureAfter({ HazelcastAutoConfiguration.class,
HibernateJpaAutoConfiguration.class }) HibernateJpaAutoConfiguration.class })
class HazelcastJpaDependencyAutoConfiguration { public class HazelcastJpaDependencyAutoConfiguration {
@Bean @Bean
@Conditional(OnHazelcastAndJpaCondition.class) @Conditional(OnHazelcastAndJpaCondition.class)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment