MBean [HikariDataSource(HikariPool-0)]을(를) 키 '데이터소스'에 등록할 수 없습니다.
(Java8+Oauth2+MySql+Hazelcast+no clustered http sessions) 조합의 prod 모드에서 아래 오류가 발생하였습니다.개발 모드는 정상적으로 동작.
Unable to register MBean [HikariDataSource (HikariPool-0)] with key 'dataSou
rce'; nested exception is javax.management.InstanceAlreadyExistsException: com.z
axxer.hikari:name=dataSource,type=HikariDataSource
로그에서 데이터 소스(hazelcast) 작성의 첫 번째 부분은 [dev]모드로 되어 있습니다.고의적인 건지는 모르겠지만
문제 해결을 도와주시기 바랍니다.
로그.
Dec 12, 2014 2:44:11 PM org.apache.catalina.startup.HostConfig deployWAR
INFO: Deploying web application archive D:\tools\apache-tomcat-7.0.55\webapps\re
tailenergy.war
[INFO] com.fg.re.ApplicationWebXml - Running with Spring profile(s) : prod
2014-12-12 14:44:19.125 WARN 1368 --- [ost-startStop-1] o.s.b.l.LoggingApplicat
ionListener : Logging environment value '-Djava.util.logging.config.file="
D:\tools\apache-tomcat-7.0.55\conf\logging.properties"' cannot be opened and wil
l be ignored (using default location instead)
log4j:WARN No appenders could be found for logger (org.jboss.logging).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more in
fo.
[DEBUG] com.fg.re.config.AsyncConfiguration - Creating Async Task Executor
[DEBUG] com.fg.re.config.MetricsConfiguration - Registering JVM gauges
[INFO] com.fg.re.config.MetricsConfiguration - Initializing Metrics JMX reportin
g
[INFO] com.hazelcast.instance.DefaultAddressPicker - null [dev] [3.2.5] Prefer I
Pv4 stack is true.
[INFO] com.hazelcast.instance.DefaultAddressPicker - null [dev] [3.2.5] Picked A
ddress[192.168.1.9]:5701, using socket ServerSocket[addr=/0:0:0:0:0:0:0:0,localp
ort=5701], bind any local is true
[INFO] com.hazelcast.system - [192.168.1.9]:5701 [dev] [3.2.5] Hazelcast 3.2.5 (
20140814) starting at Address[192.168.1.9]:5701
[INFO] com.hazelcast.system - [192.168.1.9]:5701 [dev] [3.2.5] Copyright (C) 200
8-2014 Hazelcast.com
[INFO] com.hazelcast.instance.Node - [192.168.1.9]:5701 [dev] [3.2.5] Creating M
ulticastJoiner
[INFO] com.hazelcast.core.LifecycleService - [192.168.1.9]:5701 [dev] [3.2.5] Ad
dress[192.168.1.9]:5701 is STARTING
[INFO] com.hazelcast.cluster.MulticastJoiner - [192.168.1.9]:5701 [dev] [3.2.5]
Members [1] {
Member [192.168.1.9]:5701 this
}
[INFO] com.hazelcast.core.LifecycleService - [192.168.1.9]:5701 [dev] [3.2.5] Ad
dress[192.168.1.9]:5701 is STARTED
[DEBUG] com.fg.re.config.CacheConfiguration - Starting HazelcastCacheManager
[INFO] com.hazelcast.util.HealthMonitor - [192.168.1.9]:5701 [dev] [3.2.5] memor
y.used=242.6M, memory.free=219.4M, memory.total=462.0M, memory.max=891.0M, memor
y.used/total=52.51%, memory.used/max=27.23%, load.process=-100.00%, load.system=
100.00%, load.systemAverage=-100.00%, thread.count=38, thread.peakCount=38, even
t.q.size=0, executor.q.async.size=0, executor.q.client.size=0, executor.q.operat
ion.size=0, executor.q.query.size=0, executor.q.scheduled.size=0, executor.q.io.
size=0, executor.q.system.size=0, executor.q.operation.size=0, executor.q.priori
tyOperation.size=0, executor.q.response.size=0, operations.remote.size=0, operat
ions.running.size=0, proxy.count=0, clientEndpoint.count=0, connection.active.co
unt=0, connection.count=0
[DEBUG] com.fg.re.config.DatabaseConfiguration - Configuring Datasource
[DEBUG] com.zaxxer.hikari.HikariConfig - HikariCP pool HikariPool-0 configuratio
n:
[DEBUG] com.zaxxer.hikari.HikariConfig - autoCommit......................true
[DEBUG] com.zaxxer.hikari.HikariConfig - catalog.........................
[DEBUG] com.zaxxer.hikari.HikariConfig - connectionCustomizer............com.zax
xer.hikari.HikariConfig$1@5a3cdbda
[DEBUG] com.zaxxer.hikari.HikariConfig - connectionCustomizerClassName...
[DEBUG] com.zaxxer.hikari.HikariConfig - connectionInitSql...............
[DEBUG] com.zaxxer.hikari.HikariConfig - connectionTestQuery.............
[DEBUG] com.zaxxer.hikari.HikariConfig - connectionTimeout...............30000
[DEBUG] com.zaxxer.hikari.HikariConfig - dataSource......................
[DEBUG] com.zaxxer.hikari.HikariConfig - dataSourceClassName.............com.mys
ql.jdbc.jdbc2.optional.MysqlDataSource
[DEBUG] com.zaxxer.hikari.HikariConfig - dataSourceJNDI..................
[DEBUG] com.zaxxer.hikari.HikariConfig - dataSourceProperties............{user=r
oot, url=jdbc:mysql://localhost:3306/retailenergy, password=<masked>, prepStmtCa
cheSqlLimit=2048, cachePrepStmts=true, useServerPrepStmts=true, prepStmtCacheSiz
e=250}
[DEBUG] com.zaxxer.hikari.HikariConfig - driverClassName.................
[DEBUG] com.zaxxer.hikari.HikariConfig - idleTimeout.....................600000
[DEBUG] com.zaxxer.hikari.HikariConfig - initializationFailFast..........true
[DEBUG] com.zaxxer.hikari.HikariConfig - isolateInternalQueries..........false
[DEBUG] com.zaxxer.hikari.HikariConfig - jdbc4ConnectionTest.............false
[DEBUG] com.zaxxer.hikari.HikariConfig - jdbcUrl.........................
[DEBUG] com.zaxxer.hikari.HikariConfig - leakDetectionThreshold..........0
[DEBUG] com.zaxxer.hikari.HikariConfig - maxLifetime.....................1800000
[DEBUG] com.zaxxer.hikari.HikariConfig - maximumPoolSize.................10
[DEBUG] com.zaxxer.hikari.HikariConfig - metricRegistry..................com.cod
ahale.metrics.MetricRegistry@4152b59f
[DEBUG] com.zaxxer.hikari.HikariConfig - minimumIdle.....................10
[DEBUG] com.zaxxer.hikari.HikariConfig - password........................<masked
>
[DEBUG] com.zaxxer.hikari.HikariConfig - poolName........................HikariP
ool-0
[DEBUG] com.zaxxer.hikari.HikariConfig - readOnly........................false
[DEBUG] com.zaxxer.hikari.HikariConfig - registerMbeans..................false
[DEBUG] com.zaxxer.hikari.HikariConfig - threadFactory...................
[DEBUG] com.zaxxer.hikari.HikariConfig - transactionIsolation............
[DEBUG] com.zaxxer.hikari.HikariConfig - username........................
[INFO] com.zaxxer.hikari.HikariDataSource - HikariCP pool HikariPool-0 is starti
ng.
[DEBUG] com.fg.re.config.DatabaseConfiguration - Configuring Liquibase
[INFO] com.fg.re.config.hazelcast.HazelcastCacheRegionFactory - Starting up Haze
lcastCacheRegionFactory
[DEBUG] com.fg.re.config.MailConfiguration - Configuring mail server
[INFO] com.fg.re.config.WebConfigurer - Web application configuration, using pro
files: [prod]
[DEBUG] com.fg.re.config.WebConfigurer - Initializing Metrics registries
[DEBUG] com.fg.re.config.WebConfigurer - Registering Metrics Filter
[DEBUG] com.fg.re.config.WebConfigurer - Registering Metrics Servlet
[DEBUG] com.fg.re.config.WebConfigurer - Registering Caching HTTP Headers Filter
[DEBUG] com.fg.re.config.WebConfigurer - Registering static resources production
Filter
[DEBUG] com.fg.re.config.WebConfigurer - Registering GZip Filter
[INFO] com.fg.re.config.WebConfigurer - Web application fully configured
[INFO] com.fg.re.Application - Running with Spring profile(s) : [prod]
[INFO] com.fg.re.config.ThymeleafConfiguration - loading non-reloadable mail mes
sages resources
[WARN] org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebAppl
icationContext - Exception encountered during context initialization - cancellin
g refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean wit
h name 'mbeanExporter' defined in class path resource [org/springframework/conte
xt/annotation/MBeanExportConfiguration.class]: Invocation of init method failed;
nested exception is org.springframework.jmx.export.UnableToRegisterMBeanExcepti
on: Unable to register MBean [HikariDataSource (HikariPool-0)] with key 'dataSou
rce'; nested exception is javax.management.InstanceAlreadyExistsException: com.z
axxer.hikari:name=dataSource,type=HikariDataSource
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1554) ~[spring-be
ans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539) ~[spring-beans
-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.createBean(AbstractAutowireCapableBeanFactory.java:475) ~[spring-beans-4
.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getOb
ject(AbstractBeanFactory.java:302) ~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEAS
E]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistr
y.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-4.0.8.RELEA
SE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBe
an(AbstractBeanFactory.java:298) ~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean
(AbstractBeanFactory.java:193) ~[spring-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.
preInstantiateSingletons(DefaultListableBeanFactory.java:706) ~[spring-beans-4.0
.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finish
BeanFactoryInitialization(AbstractApplicationContext.java:762) ~[spring-context-
4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refres
h(AbstractApplicationContext.java:482) ~[spring-context-4.0.8.RELEASE.jar:4.0.8.
RELEASE]
at org.springframework.boot.context.embedded.EmbeddedWebApplicationConte
xt.refresh(EmbeddedWebApplicationContext.java:109) [spring-boot-1.1.9.RELEASE.ja
r:1.1.9.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.
java:691) [spring-boot-1.1.9.RELEASE.jar:1.1.9.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java
:320) [spring-boot-1.1.9.RELEASE.jar:1.1.9.RELEASE]
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringA
pplicationBuilder.java:142) [spring-boot-1.1.9.RELEASE.jar:1.1.9.RELEASE]
at org.springframework.boot.context.web.SpringBootServletInitializer.cre
ateRootApplicationContext(SpringBootServletInitializer.java:89) [spring-boot-1.1
.9.RELEASE.jar:1.1.9.RELEASE]
at org.springframework.boot.context.web.SpringBootServletInitializer.onS
tartup(SpringBootServletInitializer.java:51) [spring-boot-1.1.9.RELEASE.jar:1.1.
9.RELEASE]
at org.springframework.web.SpringServletContainerInitializer.onStartup(S
pringServletContainerInitializer.java:175) [spring-web-4.0.8.RELEASE.jar:4.0.8.R
ELEASE]
at org.apache.catalina.core.StandardContext.startInternal(StandardContex
t.java:5479) [catalina.jar:7.0.55]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
[catalina.jar:7.0.55]
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
.java:901) [catalina.jar:7.0.55]
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:87
7) [catalina.jar:7.0.55]
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
[catalina.jar:7.0.55]
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1083
) [catalina.jar:7.0.55]
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:
1880) [catalina.jar:7.0.55]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:51
1) [na:1.8.0_25]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_25
]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.
java:1142) [na:1.8.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:617) [na:1.8.0_25]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_25]
Caused by: org.springframework.jmx.export.UnableToRegisterMBeanException: Unable
to register MBean [HikariDataSource (HikariPool-0)] with key 'dataSource'; nest
ed exception is javax.management.InstanceAlreadyExistsException: com.zaxxer.hika
ri:name=dataSource,type=HikariDataSource
at org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstan
ce(MBeanExporter.java:608) ~[spring-context-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.jmx.export.MBeanExporter.registerBeans(MBeanExpor
ter.java:533) ~[spring-context-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.jmx.export.MBeanExporter.afterPropertiesSet(MBean
Exporter.java:415) ~[spring-context-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1613) ~[spring
-beans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1550) ~[spring-be
ans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
... 28 common frames omitted
Caused by: javax.management.InstanceAlreadyExistsException: com.zaxxer.hikari:na
me=dataSource,type=HikariDataSource
at com.sun.jmx.mbeanserver.Repository.addMBean(Repository.java:437) ~[na
:1.8.0_25]
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerWithRep
ository(DefaultMBeanServerInterceptor.java:1898) ~[na:1.8.0_25]
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerDynamic
MBean(DefaultMBeanServerInterceptor.java:966) ~[na:1.8.0_25]
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerObject(
DefaultMBeanServerInterceptor.java:900) ~[na:1.8.0_25]
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.registerMBean(D
efaultMBeanServerInterceptor.java:324) ~[na:1.8.0_25]
at com.sun.jmx.mbeanserver.JmxMBeanServer.registerMBean(JmxMBeanServer.j
ava:522) ~[na:1.8.0_25]
at org.springframework.jmx.support.MBeanRegistrationSupport.doRegister(M
BeanRegistrationSupport.java:195) ~[spring-context-4.0.8.RELEASE.jar:4.0.8.RELEA
SE]
at org.springframework.jmx.export.MBeanExporter.registerBeanInstance(MBe
anExporter.java:653) ~[spring-context-4.0.8.RELEASE.jar:4.0.8.RELEASE]
at org.springframework.jmx.export.MBeanExporter.registerBeanNameOrInstan
ce(MBeanExporter.java:598) ~[spring-context-4.0.8.RELEASE.jar:4.0.8.RELEASE]
... 32 common frames omitted
[INFO] com.fg.re.config.hazelcast.HazelcastCacheRegionFactory - Shutting down Ha
zelcastCacheRegionFactory
[INFO] com.zaxxer.hikari.pool.HikariPool - HikariCP pool HikariPool-0 is shuttin
g down.
[DEBUG] com.zaxxer.hikari.pool.HikariPool - Before shutdown pool stats HikariPoo
l-0 (total=10, inUse=3, avail=7, waiting=0)
[DEBUG] com.zaxxer.hikari.pool.HikariPool - After shutdown pool stats HikariPool
-0 (total=0, inUse=0, avail=0, waiting=0)
[INFO] com.fg.re.config.CacheConfiguration - Remove Cache Manager metrics
[INFO] com.fg.re.config.CacheConfiguration - Closing Cache Manager
[INFO] com.hazelcast.core.LifecycleService - [192.168.1.9]:5701 [dev] [3.2.5] Ad
dress[192.168.1.9]:5701 is SHUTTING_DOWN
[INFO] com.hazelcast.initializer - [192.168.1.9]:5701 [dev] [3.2.5] Destroying n
ode initializer.
[INFO] com.hazelcast.instance.Node - [192.168.1.9]:5701 [dev] [3.2.5] Hazelcast
Shutdown is completed in 31 ms.
[INFO] com.hazelcast.core.LifecycleService - [192.168.1.9]:5701 [dev] [3.2.5] Ad
dress[192.168.1.9]:5701 is SHUTDOWN
[ERROR] org.springframework.boot.SpringApplication - Application startup failed
org.springframework.beans.factory.BeanCreationException: Error creating bean wit
h name 'mbeanExporter' defined in class path resource [org/springframework/conte
xt/annotation/MBeanExportConfiguration.class]: Invocation of init method failed;
nested exception is org.springframework.jmx.export.UnableToRegisterMBeanExcepti
on: Unable to register MBean [HikariDataSource (HikariPool-0)] with key 'dataSou
rce'; nested exception is javax.management.InstanceAlreadyExistsException: com.z
axxer.hikari:name=dataSource,type=HikariDataSource
at org.springframework.beans.factory.support.AbstractAutowireCapableBean
Factory.initializeBean(AbstractAutowireCapableBeanFactory.java:1554) ~[spring-be
ans-4.0.8.RELEASE.jar:4.0.8.RELEASE]
참신한 관찰.이전에는 같은 Tomcat에서 두 개의 jhipster webapp을 실행했습니다.다른 하나를 제거하면 오류가 사라집니다.이유를 알 수 있을까요?실제 가동 시에는 동일한 Tomcat 상에서2개의 jhipster webapp이 실행될 가능성이 높습니다.
비슷한 문제가 있었습니다.2개의 jhipster 어플리케이션인스턴스가 1개의 Tomcat 서버에서 동시에 실행되고 있습니다.이것도 https://github.com/jhipster/generator-jhipster/issues/874#issuecomment-113023849에 올렸습니다.
https://docs.oracle.com/javase/tutorial/jmx/mbeans/standard.html 에서
모든 JMX MBean에는 개체 이름이 있어야 합니다.오브젝트명은 JMX 클래스의 인스턴스입니다.ObjectName은 JMX 사양에서 정의된 구문에 적합해야 합니다.즉, 개체 이름에는 도메인과 키 속성 목록이 포함되어야 합니다.
http://docs.spring.io/spring-boot/docs/current-SNAPSHOT/reference/htmlsingle/ #boot-boot-http-jmx 에서
- JMX Java Management Extensions(JMX)를 통한 감시 및 관리는 응용 프로그램의 감시와 관리를 위한 표준 메커니즘을 제공합니다.기본적으로는 Spring Boot에서는 빈 ID가 'mbeanServer'인 MBeanServer가 생성되어 Spring JMX 주석(@ManagedResource, @ManagedAttribute, @ManagedOperation)이 있는 빈이 표시됩니다.
자세한 내용은 JmxAutoConfiguration 클래스를 참조하십시오.
https://github.com/spring-projects/spring-boot/blob/master/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jmx/JmxAutoConfiguration.java에서 JmxAutoConfiguration 코드를 확인해보니 이름 지정 전략에 사용되는 spring.jmx.default-domain 속성이 있습니다.
앱의 application.properties 중 하나에서 해당 속성을 값으로 설정하면 이 문제가 해결되었습니다.
spring.jmx.default-domain: test
도메인 이름은 임의이므로 두 앱 간의 이름 충돌을 피하기 위한 합리적인 방법인 것 같습니다.
저는 JMX를 사용한 경험이 없기 때문에 이 솔루션에 대한 피드백을 주시면 감사하겠습니다.
는 이런 를 다른 했습니다.spring.jmx.default-domain
Tomcat spring 、 Spring 、 Spring 、 음음음음음음음음음음음음 음음음음음음 tomcat tomcat tomcat tomcat:
spring.jmx.default-domain=somevalue
application.properties 파일에 저장됩니다.
동일한 Tomcat에 2개의 Hikari 앱을 도입하기 위해 시도했는데, 두 가지 작업이 수행되었습니다.poolName (1)을 변경하는 것뿐만 아니라 DataSource (2) Configuration의 콩 이름도 변경하는 것입니다.
@Bean(destroyMethod = "shutdown")
public DataSource dataSource2() {
HikariConfig config = new HikariConfig();
config.setPoolName("AARSHikaripool-1");
콩 이름은 datasource2인데 다른 앱은 datasource!!
JHipster 업데이트:
데이터 소스 빈이 없어졌으므로 application.yml에서 다음을 추가합니다.
spring:
jmx:
default-domain: [application_name]
구성 파일에 아래 주석을 추가합니다.
@EnableMBeanExport(registration=RegistrationPolicy.IGNORE_EXISTING)
너에게 효과가 있을 거야.
여러 응용 프로그램과 도메인이 매핑된 Tomcat 9의 나를 위해.위 중 어느 것도 효과가 없었고 즉석적으로 대처해야 했습니다.
spring.jmx.default-domain=somevalue${random.uuid}
application.properties
되고 있는 , 되었을 때 는 「」를 .close()
★★★★★★★★★★★★★★★★★」shutdown()
의 HikariDataSource
봄에는 전개되지 않도록 설정할 수 있는 "파괴" 속성(또는 유사한 속성)이 있어야 합니다.
또, 가능한 한 최신 버전의 HikariCP(2.2.5)를 사용하고 있는 것을 확인해 주세요.구 버전에서는 MBeans의 등록이 올바르게 해제되지 않았던 것 같습니다.
의 WAR가 WAR을 .「 VM 」 HikariCP 필개개개개개개2 개개개개개개 MBeans 。poolName
을 알 수 .HikariPool-0
.
풀명 jmx 도메인(spring.jmx.default-domain)을 랜덤화하는 방법은 다음과 같습니다(JmxAutoConfiguration 참조).
@Bean
public DataSource dataSource() throws SQLException {
HikariDataSource dataSource = new HikariDataSource(this);
dataSource.setPoolName("dataSource_" + UUID.randomUUID().toString());
return dataSource;
}
@Bean
@ConditionalOnMissingBean(value = ObjectNamingStrategy.class, search = SearchStrategy.CURRENT)
public ParentAwareNamingStrategy objectNamingStrategy() {
ParentAwareNamingStrategy namingStrategy = new ParentAwareNamingStrategy(new AnnotationJmxAttributeSource());
namingStrategy.setDefaultDomain("domain_" + UUID.randomUUID().toString());
return namingStrategy;
}
언급URL : https://stackoverflow.com/questions/27440985/unable-to-register-mbean-hikaridatasource-hikaripool-0-with-key-datasource
'programing' 카테고리의 다른 글
React fragment에 주요 소품을 추가할 수 있습니까? (0) | 2023.02.13 |
---|---|
TypeScript의 "declare class"와 "interface"의 차이점은 무엇입니까? (0) | 2023.02.13 |
문자열을 JSON 개체로 변환 (0) | 2023.02.09 |
전체 경로 제거, 파일 이름만 유지 (0) | 2023.02.09 |
wp미디어업로더를사용한업로드파일경로가필드에표시되지않았습니다. (0) | 2023.02.09 |