Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

楼主请问@Mapper(componentModel = "spring")注入不到spring中,你的项目不报错吗? #1

Open
574524271 opened this issue Dec 26, 2017 · 3 comments

Comments

@574524271
Copy link

import org.mapstruct.Mapper;
这个自动编译的包注入不到spring中后台报错


APPLICATION FAILED TO START


Description:

Field treeMapper in com.csdn.demo.sys.controller.RoleController required a bean of type 'com.csdn.demo.sys.mapper.TreeMapper' that could not be found.

Action:

Consider defining a bean of type 'com.csdn.demo.sys.mapper.TreeMapper' in your configuration.

@wrrgit
Copy link

wrrgit commented Jun 1, 2018

这个问题如何解决?

@576201094
Copy link

同问,我也遇到同样的问题

@yeliliang
Copy link

解决办法:
在maven环境下
先执行 mvn clean
在执行 mvn install
就可以了
(原因是:@Mapper 实体-模型映射 会在 target目录下生成一个generated-sources,里边实现了这个接口)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants