elunez / eladmin

eladmin jpa 版本:项目基于 Spring Boot 2.6.4、 Jpa、 Spring Security、Redis、Vue的前后端分离的后台管理系统,项目采用分模块开发方式, 权限控制采用 RBAC,支持数据字典与数据权限管理,支持一键生成前后端代码,支持动态路由
https://eladmin.vip/demo
Apache License 2.0
21.36k stars 7.36k forks source link

启动报错Parameter 1 of constructor in me.zhengjie.modules.mnt.service.impl.AppServiceImpl required a bean of type 'me.zhengjie.modules.mnt.service.mapstruct.AppMapper' that could not be found. #392

Closed liuyang77886 closed 4 years ago

liuyang77886 commented 4 years ago

Spring Boot :: (v2.1.0.RELEASE) elAdmin- 2020-06-08 07:59:15 [main] INFO  me.zhengjie.AppRun - Starting AppRun on DESKTOP-DOMO0RN with PID 34108 (G:\workspaces_cms\eladmin\eladmin\eladmin-system\target\classes started by Administrator in G:\workspaces_cms\eladmin\eladmin\eladmin-system) elAdmin- 2020-06-08 07:59:15 [main] INFO  me.zhengjie.AppRun - The following profiles are active: dev elAdmin- 2020-06-08 07:59:16 [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Multiple Spring Data modules found, entering strict repository configuration mode! elAdmin- 2020-06-08 07:59:16 [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Bootstrapping Spring Data repositories in DEFAULT mode. elAdmin- 2020-06-08 07:59:17 [main] INFO  o.s.d.r.c.RepositoryConfigurationDelegate - Finished Spring Data repository scanning in 452ms. Found 23 repository interfaces. elAdmin- 2020-06-08 07:59:17 [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'asyncTaskProperties' of type [me.zhengjie.config.thread.AsyncTaskProperties] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) elAdmin- 2020-06-08 07:59:17 [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'asyncTaskExecutePool' of type [me.zhengjie.config.thread.AsyncTaskExecutePool$$EnhancerBySpringCGLIB$$3c73f7d3] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) elAdmin- 2020-06-08 07:59:17 [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$4a388884] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) elAdmin- 2020-06-08 07:59:18 [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'redisConfig' of type [me.zhengjie.config.RedisConfig$$EnhancerBySpringCGLIB$$6360ce9c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) elAdmin- 2020-06-08 07:59:18 [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration' of type [org.springframework.security.config.annotation.configuration.ObjectPostProcessorConfiguration$$EnhancerBySpringCGLIB$$e2e650be] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) elAdmin- 2020-06-08 07:59:18 [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'objectPostProcessor' of type [org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) elAdmin- 2020-06-08 07:59:18 [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@5f9f3e58' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) elAdmin- 2020-06-08 07:59:18 [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration' of type [org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration$$EnhancerBySpringCGLIB$$7baf370] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) elAdmin- 2020-06-08 07:59:18 [main] INFO  o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) elAdmin- 2020-06-08 07:59:20 [main] INFO  o.s.b.w.e.tomcat.TomcatWebServer - Tomcat initialized with port(s): 8000 (http) elAdmin- 2020-06-08 07:59:20 [main] INFO  o.a.coyote.http11.Http11NioProtocol - Initializing ProtocolHandler ["http-nio-8000"] elAdmin- 2020-06-08 07:59:20 [main] INFO  o.a.catalina.core.StandardService - Starting service [Tomcat] elAdmin- 2020-06-08 07:59:20 [main] INFO  o.a.catalina.core.StandardEngine - Starting Servlet Engine: Apache Tomcat/9.0.12 elAdmin- 2020-06-08 07:59:20 [main] INFO  o.a.c.core.AprLifecycleListener - The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [E:\code\jdk1.8.0_181\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;E:/code/jdk1.8.0_251/jre8/bin/server;E:/code/jdk1.8.0_251/jre8/bin;E:/code/jdk1.8.0_251/jre8/lib/amd64;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.2\libnvvp;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v9.2\libnvvp;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\bin;C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v10.1\libnvvp;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\IDM Computer Solutions\UltraEdit;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;d:\Program Files\Git\cmd;E:\pfile\OpenSSL-Win64\bin;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;J:\javasoft\sonar\sonar-scanner-2.5\bin;C:\Program Files (x86)\scala\bin;C:\Program Files (x86)\Common Files\Thunder Network\KanKan\Codecs;C:\Program Files\NVIDIA Corporation\Nsight Compute 2019.5.0\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;E:\pfile\cocos2d-x-cocos2d-x-3.17.2\templates;E:\pfile\cocos2d-x-cocos2d-x-3.17.2\tools\cocos2d-console\bin;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;E:\code\jdk1.8.0_181\bin\;E:\code\Android\android-sdk2441\platform-tools;E:\code\Android\android-sdk2441\tools;D:\Program Files\Fiddler;E:\code\gradle-4.10.2\bin;E:\pfile\Python37;C:\Users\Administrator\AppData\Roaming\npm;E:\codes\MicrosoftVSCode\bin;E:\pfile\opcv\opencv2.4.13.6\build\x64\vc14\bin;E:\pfile\cmake-3.12.4-win64-x64\bin;D:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin;E:\pfile\cuda\bin;E:\pfile\cuda\lib\x64;E:\pfile\Anaconda3\Scripts;C:\Program Files (x86)\EPSON\ScanSDK_V10\Bin;E:\pfile\nodejs;d:\Program Files\Docker Toolbox;D:\Qt\Qt5.12.4\5.12.4\mingw73_64\bin;D:\Qt\Qt5.12.4\Tools\mingw730_64\bin;C:\Program Files (x86)\scala\bin;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;;E:\code\eclipse\eclipse-jee-2020-03-R-incubation-win32-x86_64;;.] elAdmin- 2020-06-08 07:59:20 [main] INFO  o.a.c.c.C.[Tomcat].[localhost].[/] - Initializing Spring embedded WebApplicationContext elAdmin- 2020-06-08 07:59:20 [main] INFO  o.s.web.context.ContextLoader - Root WebApplicationContext: initialization completed in 5167 ms elAdmin- 2020-06-08 07:59:20 [main] INFO  o.s.b.w.s.FilterRegistrationBean - Mapping filter: 'characterEncodingFilter' to: [/] elAdmin- 2020-06-08 07:59:20 [main] INFO  o.s.b.w.s.DelegatingFilterProxyRegistrationBean - Mapping filter: 'springSecurityFilterChain' to: [/] elAdmin- 2020-06-08 07:59:20 [main] INFO  o.s.b.w.s.FilterRegistrationBean - Mapping filter: 'webStatFilter' to urls: [/] elAdmin- 2020-06-08 07:59:20 [main] INFO  o.s.b.w.s.FilterRegistrationBean - Mapping filter: 'corsFilter' to: [/] elAdmin- 2020-06-08 07:59:20 [main] INFO  o.s.b.w.s.ServletRegistrationBean - Servlet dispatcherServlet mapped to [/] elAdmin- 2020-06-08 07:59:20 [main] INFO  o.s.b.w.s.ServletRegistrationBean - Servlet statViewServlet mapped to [/druid/*] elAdmin- 2020-06-08 07:59:20 [main] INFO  c.a.d.s.b.a.DruidDataSourceAutoConfigure - Init DruidDataSource elAdmin- 2020-06-08 07:59:21 [main] INFO  c.alibaba.druid.pool.DruidDataSource - {dataSource-1} inited elAdmin- 2020-06-08 07:59:21 [main] INFO  o.h.jpa.internal.util.LogHelper - HHH000204: Processing PersistenceUnitInfo [ name: default ...] elAdmin- 2020-06-08 07:59:21 [main] INFO  org.hibernate.Version - HHH000412: Hibernate Core {5.3.7.Final} elAdmin- 2020-06-08 07:59:21 [main] INFO  org.hibernate.cfg.Environment - HHH000206: hibernate.properties not found elAdmin- 2020-06-08 07:59:21 [main] INFO  o.h.annotations.common.Version - HCANN000001: Hibernate Commons Annotations {5.0.4.Final} elAdmin- 2020-06-08 07:59:22 [main] INFO  org.hibernate.dialect.Dialect - HHH000400: Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect elAdmin- 2020-06-08 07:59:24 [main] INFO  o.s.o.j.LocalContainerEntityManagerFactoryBean - Initialized JPA EntityManagerFactory for persistence unit 'default' elAdmin- 2020-06-08 07:59:24 [main] WARN  o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'appController' defined in file [G:\workspaces_cms\eladmin\eladmin\eladmin-system\target\classes\me\zhengjie\modules\mnt\rest\AppController.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'appServiceImpl' defined in file [G:\workspaces_cms\eladmin\eladmin\eladmin-system\target\classes\me\zhengjie\modules\mnt\service\impl\AppServiceImpl.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'me.zhengjie.modules.mnt.service.mapstruct.AppMapper' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} elAdmin- 2020-06-08 07:59:24 [main] INFO  o.s.o.j.LocalContainerEntityManagerFactoryBean - Closing JPA EntityManagerFactory for persistence unit 'default' elAdmin- 2020-06-08 07:59:24 [main] INFO  c.alibaba.druid.pool.DruidDataSource - {dataSource-1} closing ... elAdmin- 2020-06-08 07:59:24 [main] INFO  c.alibaba.druid.pool.DruidDataSource - {dataSource-1} closed elAdmin- 2020-06-08 07:59:24 [main] INFO  o.a.catalina.core.StandardService - Stopping service [Tomcat] elAdmin- 2020-06-08 07:59:24 [main] INFO  o.s.b.a.l.ConditionEvaluationReportLoggingListener - 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. elAdmin- 2020-06-08 07:59:24 [main] ERROR o.s.b.d.LoggingFailureAnalysisReporter - 


APPLICATION FAILED TO START


Description:

Parameter 1 of constructor in me.zhengjie.modules.mnt.service.impl.AppServiceImpl required a bean of type 'me.zhengjie.modules.mnt.service.mapstruct.AppMapper' that could not be found.

Action:

Consider defining a bean of type 'me.zhengjie.modules.mnt.service.mapstruct.AppMapper' in your configuration.



elunez commented 4 years ago

mvn compile

看看有没有 AppMapper 的实现类 target -> generated-sources -> mnt.service.mapstruct

image

liuyang77886 commented 4 years ago

我用的elipse2020版本,jdk1.8,maven3.3.9,win10. 通过对整个eladmin大工程mvn compile,eladmin-system生成了mapstruct,有了eladmin\eladmin-system\target\generated-sources\annotations\me\zhengjie\modules\system\service\mapstruct,但是eladmin\eladmin-logging\target\generated-sources\annotations下是空的。启动报错

Parameter 1 of constructor in me.zhengjie.service.impl.LogServiceImpl required a bean of type 'me.zhengjie.service.mapstruct.LogErrorMapper' that could not be found.

Action:

Consider defining a bean of type 'me.zhengjie.service.mapstruct.LogErrorMapper' in your configuration.