省流 如果你是用SpringBoot 3 的話,你的Mybatis版本也要更新到3,不然會一直出現 1 Parameter 1 of constructor in ...required a bean of type ... that could not be found. 這樣的錯誤 1 2 3 4 5 <dependency> <groupId>org.mybatis.spring.boot</groupId> <artifactId>mybatis-spring-boot-starter</artifactId> <version>3.0.3</version> </dependency> 故事 這陣子在做SideProject,想練習redis, rebbitMQ, 以及Elastic Search。在引入MyBatis時出現了一個錯誤(圖是網路找的) 當時百思不得其解,我該加的Annotation加了,my-batis xml也配了,該處理的都處理了,但不知道為什麼就是找不到,期間來回試了多種方法,用ApplicationContext去找bean呀...