Description:

Field userDao in com.gcy.springsecuritydemo.service.user.UserService required a bean of type 'com.gcy.springsecuritydemo.dao.user.UserDao' that could not be found.


Action:

Consider defining a bean of type 'com.gcy.springsecuritydemo.dao.user.UserDao' in your configuration.

Disconnected from the target VM, address: '127.0.0.1:61935', transport: 'socket'

Process finished with exit code 1

 

解决办法:启动类加注解@MapperScan

@SpringBootApplication
@MapperScan("com.gcy.springsecuritydemo.dao")//mybatis扫描
public class SpringsecuritydemoApplication {

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

 

相关文章:

  • 2022-12-23
  • 2021-11-25
  • 2022-12-23
  • 2021-08-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-15
猜你喜欢
  • 2021-08-10
  • 2022-12-23
  • 2021-09-26
  • 2022-12-23
  • 2021-05-17
  • 2022-01-21
相关资源
相似解决方案