0
0

More than 3 years have passed since last update.

Parameter 0 of constructor in XXXDao required a bean of type XXXMapper that could not be found.

Posted at

myPCで環境構築中に発生したので載せておきます。

1つ目

SpringBootApplicationのパッケージ構成が宜しくない場合があります。
一つ上の階層に移動させてみたり色々確認してみてください。

com/example/demo/DemoApplication.java
@SpringBootApplication
public class DemoApplication {

    public static void main(String[] args) {
        SpringApplication.run(DemoApplication.class, args);
    }
}

2つ目

必要なプラグインが入っていない
maven,gradleに必要なプラグインが入っていない可能性があるので入れましょう
例:mavenでの場合
記載して更新してあげればこれだけで解決する場合があります。
ペースト時に赤字の警告が出るかもですが気にしないで更新かけてみてください

pom.xml
    <dependency>
        <groupId>org.mybatis.spring.boot</groupId>
        <artifactId>mybatis-spring-boot-starter</artifactId>
        <version>2.2.0</version>
    </dependency>
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0