[已解决]springBoot 中添加 dev-tools后,运行程序报错Unenhance strategy

发生条件:在pom.xml中增加dev-tools的依赖,程序启动后,调用程序接口报错

问题现象:
-------------------------------------------------------------
Registered concrete types: 5 (approximate size: 630.7 kB)
  [interface java.util.Collection] : ArrayList<Object>
  [interface java.util.Map] : LinkedHashMap<Object, Object>
  [interface java.util.Map$Entry] : MapEntry<Object, Object>
  [interface java.util.Set] : LinkedHashSet<Object>
  [interface java.util.List] : ArrayList<Object>
-------------------------------------------------------------
Resolved strategies: 1 (approximate size: 42,825.6 kB)
{source: AppOrganization, dest: AppOrganizationDTO, in-place:false}: InstantiateAndUseCustomMapperStrategy<AppOrganization, AppOrganizationDTO> {customMapper: [email protected], unenhancer: [email protected], objectFactory: DefaultConstructorObjectFactory<AppOrganizationDTO>}
-------------------------------------------------------------
Unenhance strategy: [email protected]
-----end dump of current state-------------------------------
    at ma.glasnost.orika.impl.ExceptionUtility.newMappingException(ExceptionUtility.java:55)
    at ma.glasnost.orika.impl.MapperFacadeImpl.map(MapperFacadeImpl.java:752)
    at ma.glasnost.orika.impl.MapperFacadeImpl.map(MapperFacadeImpl.java:721)
问题原因:貌似是orika的bug
解决方案:
(参考https://stackoverflow.com/questions/33324944/orika-classcastexception-in-spring-boot-webapp):
  1. Create a META-INF folder in src/main/resources.
  2. Create spring-devtools.properties file in it.
  3. Add restart.include.orika=/orika-core.*\.jar to the file.
  

原文地址:https://www.cnblogs.com/xueluozhangxin/p/8711155.html

时间: 2024-08-04 05:43:52

[已解决]springBoot 中添加 dev-tools后,运行程序报错Unenhance strategy的相关文章

运行编译后的程序报错 error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory

运行编译后的程序报错  error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory -------------------------------------------------------------------------------------------------------------------------------------

解决Eclips中使用V7兼容包的主题报错的问题

新建项目默认会使用v7包中的主题,如果你workplace中没有v7库,那是一定会报错的. 1.导入v7jar,没用,因为需要的是v7的资源文件 2.既然如此,导入v7的整个项目应该ok了吧,import之后,尼玛还报错,百思不得骑姐,删了导,导了删,把SDK都弄坏了还是报错.并且build path还不报错. 终极大招,原来原因是因为v7库和项目没有在一个盘符下,import的时候,注意要勾选copy projects into workplace,也就是把依赖库从sdk复制一份到当前的wor

解决cgal中的surface_mesh_deformation,代码copy到别处报错

我只想说我遇到过多少奇葩的bug啊...这么奇葩的错误我竟然能debug出来真是醉醉的 cgal4.5之后,有实现surface_mesh_deformation的example. 1.如何正常编译example? 最好是在编译cgal的时候,cmake中的entry就有,勾选上with_eigen,然后配置include目录即可. 这样以后省事,所以编译cgal的时候,要好好检查外置的库,会用到的都先加上. 如果不想重新编译cgal,在重新用cmake编译surface_mesh_deform

eclipse升级Android SDK Tool版本到25.2.5后运行项目报错Unable to build: the file dx.jar was not loaded from the SDK folder

概述 由于最近通过SDK-Manager更新了build-tools,当要用到dx.jar这个包时,自动调用最新版本Android SDK build-tools中dx.jar,但是运行android项目时Console却提示: 解决方案 解决办法就是:确保dx.jar这个文件在build-tools\lib和选择的Andriod SDK Tools版本一致就可以. 我用的 Android SDk build-tools 最新版本是 28.0.3,安装的Andriod SDK Tools版本是2

解决Linux关闭SSH,终端后运行程序终止问题(包括后台)

问题描述: 每次SSH到服务器上,然后运行了一个自己写的服务端程序,比如 ./myserver.sh ,然后关闭ssh或者终端之后,发现服务不能访问. 简要分析下: 根据   这篇博文  的提示,ssh登录后会新建一个会话,一个登陆shell发起的会话,一般由一个会话首进程.一个前台进程组.一个后台进程组组成.通常来说,会话首进程是一个登录shell,比如bash.进程组是一个或多个进程的集合,进程组属于一个会话.一般来说,一个进程组中的其它进程的父进程是进程组组长进程的ID,如果,这个进程组组

解决Eclipse中Java工程间循环引用而报错的问题

如果myeclipse  报如下错误 A cycle was detected in the build path of project 如果我们的项目包含多个工程(project),而它们之间又是循环引用的关系,那么Eclipse在编译时会抛出如下一个错误信息: "A cycle was detected in the build path of project: XXX" 解决方法非常简单: Eclipse Menu -> Window -> Preferences..

PostgreSQL添加新服务器连接时,报错“Server doesn&#39;t listen ”,已解决。

PostgreSQL添加新的服务器连接时,报错: 解决方法: 第一步:修改配置文件中连接的服务器列表,添加服务器IP地址(图pg002.png) 配置文件地址:数据库右击属性,打开数据库的安装路径在data文件中找到配置文件pg_hba.conf. 如:D:\Program Files\PostgreSQL\9.4\data\pg_hba.conf 注:只要修改IP路径就可以了,‘/’后面的数字都为32. 第二步:修改配置文件后,启动服务器的服务: 启动服务完成,连接服务器,新服务器就可以正常的

Resx 文件无效。未能加载 .RESX 文件中使用的类型 System.Collections.Generic.List`1请确保已在项目中添加了必需的引用。

在C#程序编写过程中,会遇到:Resx 文件无效.未能加载 .RESX 文件中使用的类型 System.Collections.Generic.List1`请确保已在项目中添加了必需的引用. 主要原因很可能是使用了类的可序列化的原因,代码如下: [Serializable] public class TimeLineItem { public string Title; public string Content; public TimeLineItem(string content) { th

02-SQLlite3之alter:在已有的表中添加、修改或删除列

alter table语句 用于在已有的表中添加.修改或删除列 原始表: 一.alter在表中添加新的列 语法:alter table table_name add column_name datatype 注意:sqlite3中alter不支持删除列的操作 注意:sqlite3中alter 不能更改一个已经存在的字段的名称.数据类型.限定符等等 二.alter修改表名 语法:alter table 表名 rename to 新表名;