Default spring.datasource.jmx-enabled to false

Change the default value of spring.datasource.jmx-enabled to false
to prevent InstanceAlreadyExistsException problems when using the
Spring Test Framework.

Fixes gh-1590
This commit is contained in:
Phillip Webb
2014-11-06 20:55:04 -08:00
parent d040bb72d3
commit 96a031cf20
6 changed files with 8 additions and 4 deletions

View File

@@ -32,7 +32,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
@SpringApplicationConfiguration(classes = SampleDataJpaApplication.class)
@WebAppConfiguration
// Enable JMX so we can test the MBeans (you can't do this in a properties file)
@TestPropertySource(properties = "spring.jmx.enabled:true")
@TestPropertySource(properties = { "spring.jmx.enabled:true",
"spring.datasource.jmx-enabled:true" })
@ActiveProfiles("scratch")
// Separate profile for web tests to avoid clashing databases
public class SampleDataJpaApplicationTests {