首页 > 其他分享 >在使用SpringBoot装配mybatis时出现异常

在使用SpringBoot装配mybatis时出现异常

时间:2023-12-01 18:01:14浏览次数:30  
标签:SpringBoot service demo 出现异常 mybatis com example

在使用SpringBoot装配mybatis时出现异常

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

Description:

Field studentService in com.example.demo.action.StudentController required a bean of type 'com.example.demo.service.StudentService' that could not be found.

The injection point has the following annotations:
	- @org.springframework.beans.factory.annotation.Autowired(required=true)


Action:

Consider defining a bean of type 'com.example.demo.service.StudentService' in your configuration.


Process finished with exit code 0

  

启动类上加上一个注解,即可

@ComponentScan(basePackages = {"com.example.demo.service"})

标签:SpringBoot,service,demo,出现异常,mybatis,com,example
From: https://www.cnblogs.com/lwl80/p/17870627.html

相关文章

  • 2023版SpringBoot2 仿B站高性能前端+后端项目开发全流程
    2023版SpringBoot2仿B站高性能前端+后端项目51xuebc+尾缀SpringBoot2仿B站高性能前端+后端项目:打造高效、稳定、可扩展的应用在当今的互联网时期,网站的性能、稳定性和可扩展性成为了权衡一个项目胜利与否的关键要素。本文将引见如何运用SpringBoot2构建一个仿B站的高性能前......
  • springboot 启动命令过长问题处理(Error running 'xxxxApplication': Command line is
      翻译搜索复制......
  • springboot创建线程池
    1.线程池的配置:@ConfigurationpublicclassThreadPoolConfig{@Bean(name="myThreadPool")//告诉你这个线程池的名字publicThreadPoolTaskExecutorthreadPoolTaskExecutor(){ThreadPoolTaskExecutorexecutor=newThreadPoolTaskExecutor();ex......
  • springboot如何用jar包启动,同时为不同机房设置不同的配置文件
    1、首先先把配置文件从jar中抽离示例代码:<plugin><groupId>org.apache.maven.plugins</groupId><artifactId>maven-jar-plugin</artifactId><version>3.2.0</version><configuration><excludes>......
  • springboot云HIS信息管理系统
    系统功能:为居民建立一份动态、连续、实时、共享的个人电子健康档案,包括家庭和个人信息采集、编辑、常见病诊疗、疾病预防控制服务和健康教育。针对基层医院的业务特点,实现以财务核算为基础,以临床医疗服务为中心的全程信息化管理,主要包括以下业务模块:门诊住院收费管理、以电子病历......
  • Mybatis-plus逻辑删除
    转载自:www.javaman.cn1、application.yml配置mybatis-plus:表示这是MyBatis-Plus的配置部分。global-config:全局配置。db-config:数据库相关配置。logic-delete-field:指定逻辑删除的字段名。在这里,指定的字段名是deleted。这意味着,当你调用MyBatis-Plus的逻辑......
  • mybatis mysql Data truncation: Incorrect integer value: '' for column 'xxx' at
     com.mysql.jdbc.MysqlDataTruncation:Datatruncation:Incorrectintegervalue:''forcolumn'n_before_group_id'atrow1 mybatisforeach插入时出现这个报错,原因是某字段插入空值时需要插入NULl而不是‘’ 解决办法:<choose><whentest="item.x......
  • 基于SpringBoot的在线视频教育平台-计算机毕业设计源码+LW文档
    一、选题背景及选题意义(国内外研究现状、初步设想及拟解决的问题):选题背景及意义:在线教育顾名思义,是以网络为介质的教学方式,通过网络,学员与教师即使相隔万里也可以开展教学活动;此外,借助网络课件,学员还可以随时随地进行学习,真正打破了时间和空间的限制,对于工作繁忙,学习时间不固定的......
  • Springboot017学生读书笔记共享-计算机毕业设计源码+LW文档
    摘要本论文主要论述了如何使用JAVA语言开发一个读书笔记共享平台,本系统将严格按照软件开发流程进行各个阶段的工作,采用B/S架构,面向对象编程思想进行项目开发。在引言中,作者将论述读书笔记共享平台的当前背景以及系统开发的目的,后续章节将严格按照软件开发流程,对系统进行各个阶......
  • SSM SpringBoot vue考勤信息管理系统
    SSMSpringBootvue考勤信息管理系统系统功能登录注册个人中心部门信息管理上班时间管理考勤信息管理员工信息管理签到管理请假信息管理加班申请管理出差申请管理开发环境和技术开发语言:Java使用框架:SSM(Spring+SpringMVC+Mybaits)或SpringBoot前端:v......