Sping Cloud项目启动报A component required a bean of type 'com.tianyan.bbc.dao.SecurityUserBaseMapper' that could not be found.

项目构建正常,启动和Debug报以下错误:

Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug‘ enabled.
2018-12-14 09:49:32.038 [main] ERROR o.s.b.diagnostics.LoggingFailureAnalysisReporter -

***************************
APPLICATION FAILED TO START
***************************

Description:

A component required a bean of type ‘com.tianyan.bbc.dao.SecurityUserBaseMapper‘ that could not be found.

Action:

Consider defining a bean of type ‘com.tianyan.bbc.dao.SecurityUserBaseMapper‘ in your configuration.

Disconnected from the target VM, address: ‘127.0.0.1:56886‘, transport: ‘socket‘

Process finished with exit code 1

解决办法:

启动类上加上

@MapperScan({ "com.tianyan.bbc.dao"})

Sping Cloud项目启动报A component required a bean of type 'com.tianyan.bbc.dao.SecurityUserBaseMapper' that could not be found.

原文地址:https://www.cnblogs.com/tianyan87/p/10119522.html

时间: 2024-10-24 14:26:08

Sping Cloud项目启动报A component required a bean of type 'com.tianyan.bbc.dao.SecurityUserBaseMapper' that could not be found.的相关文章

spring cloud gateway网关启动报错:No qualifying bean of type 'org.springframework.web.reactive.DispatcherHandler'

网关配置好后启动报错如下: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is java.lang.RuntimeException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'servletEndpoint

运行springboot项目报错:Field userMapper in XX required a bean of type 'xx' that could not be found.

运行springboot项目报错: *************************** APPLICATION FAILED TO START *************************** Description: Field userMapper in com.whohim.springboot.service.impl.UserServiceImpl required a bean of type 'com.whohim.springboot.dao.UserMapper' t

【spring boot】mybatis启动报错:Consider defining a bean of type 'com.newhope.interview.dao.UserMapper' in your configuration.

启动报错: 2018-02-24 22:41:00.442 WARN 2952 --- [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error c

Eureka Server项目启动报错处理

Eureka Server项目启动报错处理 Eureka是一个服务发现组件,提供服务注册.发现等注册中心功能,使用spring boot启动eureka应用时出现报错: 20:36:17.646 [restartedMain] ERROR org.springframework.boot.SpringApplication - Application run failed java.lang.NoSuchMethodError: org.springframework.boot.builder.

tomcat下部署了多个项目启动报错java web error:Choose unique values for the 'webAppRootKey' context-param in your web.xml files

应该是tomcat下部署了多个项目且都使用log4j. <!--如果不定义webAppRootKey参数,那么webAppRootKey就是缺省的"webapp.root".但最好设置,以免项目之间的名称冲突. 定义以后,在Web Container启动时将把ROOT的绝对路径写到系统变量里. 然后log4j的配置文件里就可以用${webName.root }来表示Web目录的绝对路径,把log文件存放于webapp中. 此参数用于后面的“Log4jConfigListener”

SpringBoot项目启动报错:java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

.   ____          _            __ _ _ /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/  ___)| |_)| | | | | || (_| |  ) ) ) )  '  |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Sprin

springboot项目启动报错 url&#39; attribute is not specified and no embedded datasource could be configured

报错相关信息: 2019-07-22 17:12:48.971 ERROR 8312 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START *************************** Description: Failed to configure a DataSource: 'url' attribute is not

springboot-elasticsearch项目启动报错:&#39;elasticsearchTemplate&#39; that could not be found

解决: 将elasticsearch的相关配置加入到application.yml配置文件中就可以解决 springboot-elasticsearch项目启动报错:'elasticsearchTemplate' that could not be found 原文地址:https://www.cnblogs.com/koudaiyoutang/p/11551311.html

vue 项目启动报错:Cannot assign to read only property &#39;exports&#39; of object &#39;#&lt;Object&gt;&#39;

最近做项目,打开一个新项目,在启动时报错 查询百度结果是 在webpack打包的时候,可以在js文件中混用require和export.但是不能混用import 以及module.exports. 因为webpack 2中不允许混用import和module.exports, 但是在经过我试验之后,发现不起作用,再去百度,发现一个解决办法: 执行npm: npm install babel-plugin-transform-es2015-modules-commonjs 然后在 babelrc文