Consider defining a bean of type ‘com.ls.config.DBConfig1’ in your configuration的解决方案(已解决)
Consider defining a bean of type 'com.ls.config.DBConfig1' in your configuration.出现的解决方案,网上找了很多方法,都不见效,后来自己,仔细阅读错误发现,com.ls.config.DBConfig1这个类没有被注入到Spring容器中,于是我在该加上了@Component这个注解之后,便得到解决。
![Consider defining a bean of type 'com.ls.config.DBConfig1' in your configuration Consider defining a bean of type 'com.ls.config.DBConfig1' in your configuration](/default/index/img?u=aHR0cHM6Ly9waWFuc2hlbi5jb20vaW1hZ2VzLzE0MS81MzYyMWUyMWM2NmFmN2ZkNzFhMDAwZTk1ZGI3YzcyNS5wbmc=)
如果还是没有解决,可以私信我!!!