测试类所在包(ctrl)与目标所在包(controller)不一致
修改测试类上面的注解, 带上classes参数
测试输出结果:
Description:
Field myProperties in com.wnc.sboot1.controller.UserController required a bean of type ‘com.wnc.sboot1.config.MyProperties‘ that could not be found.
Action:
Consider defining a bean of type ‘com.wnc.sboot1.config.MyProperties‘ in your configuration.
修改:
启动方式改为App.class. controller层去掉@EnableAutoConfiguration
改为***-data-redis
原文:http://www.cnblogs.com/crazyData/p/7780540.html