gpt4 book ai didi

gradle - JHipster测试:禁用二级缓存时,NoCacheRegionFactoryAvailableException

转载 作者:行者123 更新时间:2023-12-03 06:25:44 25 4
gpt4 key购买 nike

当我使用jhipster生成应用程序时,我禁用了二级缓存。但是,当我运行“渐变测试”或“以junit测试运行”来测试应用程序时,由于“NoCacheRegionFactoryAvailableException”而失败。我已经检查了目录“src / test / resources / config”中的application.yml,并确保禁用了第二个缓存。我不知道为什么该应用程序仍在寻找二级缓存。有什么线索怎么发生的吗?或如何完全禁用二级缓存?

除测试失败外,其他所有功能均正常运行,该应用程序可以成功运行。

src / test / resources / config中的application.yml

spring:
application:
name: EMS
datasource:
url: jdbc:h2:mem:EMS;DB_CLOSE_DELAY=-1
name:
username:
password:
jpa:
database-platform: com.espion.ems.domain.util.FixedH2Dialect
database: H2
open-in-view: false
show_sql: true
hibernate:
ddl-auto: none
naming-strategy: org.springframework.boot.orm.jpa.hibernate.SpringNamingStrategy
properties:
hibernate.cache.use_second_level_cache: false
hibernate.cache.use_query_cache: false
hibernate.generate_statistics: true
hibernate.hbm2ddl.auto: validate
data:
elasticsearch:
cluster-name:
cluster-nodes:
properties:
path:
logs: target/elasticsearch/log
data: target/elasticsearch/data
mail:
host: localhost
mvc:
favicon:
enabled: false
thymeleaf:
mode: XHTML
liquibase:
contexts: test

security:
basic:
enabled: false

server:
port: 10344
address: localhost

jhipster:
async:
corePoolSize: 2
maxPoolSize: 50
queueCapacity: 10000
security:
rememberMe:
# security key (this key should be unique for your application, and kept secret)
key: jhfasdhflasdhfasdkfhasdjkf
metrics: # DropWizard Metrics configuration, used by MetricsConfiguration
jmx.enabled: true
swagger:
title: EMS API
description: EMS API documentation
version: 0.0.1
termsOfServiceUrl:
contactName:
contactUrl:
contactEmail:
license:
licenseUrl:
enabled: false

最佳答案

src/test/resources/config/application.yml移到src/test/resources目录。

您可以从https://github.com/jhipster/generator-jhipster/issues/3730找到该解决方案

关于gradle - JHipster测试:禁用二级缓存时,NoCacheRegionFactoryAvailableException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37925705/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com