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
pull/4981/head
Stephane Nicoll 9 years ago
parent 5e5542f09c
commit 179467bdd9

@ -1,5 +1,5 @@
/* /*
* 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;
* 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)

Loading…
Cancel
Save