小编Joh*_*zar的帖子

如何使用 MapStruct 将字符串转换为映射?

Story我的 Spring Boot 应用程序中有实体。它的String字段storyInfo包含:

{"title":"random title", "description":"random description"}
Run Code Online (Sandbox Code Playgroud)

对于我的Story实体,我有StoryDTO一个map名为 的字段storyInfo。问题是:如何将String字段从using转换为Stroryin ?MapStoryDTOMapStruct

java spring dto spring-boot mapstruct

4
推荐指数
1
解决办法
2万
查看次数

如何禁用 jhipster 注册表?

我已经用注册表生成了 jhipster 单体应用程序。如何关闭注册表?我可以在 DEV 配置文件中启动应用程序,但它在 PROD 配置文件中崩溃并出现错误:

java.lang.IllegalStateException: Could not locate PropertySource and the fail fast property is set, failing at org.springframework.cloud.config.client.ConfigServicePropertySourceLocator.locate(ConfigServicePropertySourceLocator.java:132) at org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.initialize(PropertySourceBootstrapConfiguration.java:93) at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:567) at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:338) at org.springframework.boot.SpringApplication.run(SpringApplication.java:301) at com.qitsoftware.arch3d.Arch3DApp.main(Arch3DApp.java:68) Caused by: org.springframework.web.client.ResourceAccessException: I/O error on GET request for "http://localhost:8761/config/Arch3D/prod/master": Connection refused (Connection refused); nested exception is java.net.ConnectException: Connection refused (Connection refused) at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:666) at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:613)at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:531) at org.springframework.cloud.config.client.ConfigServicePropertySourceLocator.getRemoteEnvironment(ConfigServicePropertySourceLocator.java:172) at org.springframework.cloud.config.client.ConfigServicePropertySourceLocator.locate(ConfigServicePropertySourceLocator.java:93) ... 5 common frames omitted

registry jhipster

2
推荐指数
1
解决办法
2300
查看次数

标签 统计

dto ×1

java ×1

jhipster ×1

mapstruct ×1

registry ×1

spring ×1

spring-boot ×1