原因:找不到请求的bean类型

1. 方法一:添加config注入bean

 

/**/
@Configuration
public class TokenConfig {
    /**
     *
     */
    @Bean
    public TokenService tokenService() {
        return new TokenService();
    }
}

2. 方法二:在启动类DemoApplication上添加包所在位置注解

@ComponentScan(value = {"com.bat.demo","com.bat.token.common"})

 

相关文章:

  • 2021-11-05
  • 2021-04-24
  • 2021-07-07
  • 2021-08-31
  • 2021-08-31
  • 2021-10-09
猜你喜欢
  • 2021-08-02
  • 2021-06-14
  • 2022-12-23
  • 2022-12-23
  • 2021-05-24
  • 2021-05-05
  • 2021-12-16
相关资源
相似解决方案