The injection point has The following annotations:
- the @ org. Springframework. Beans. Factory. The annotation. Autowired (required=true)
Action:
Consider defining a bean of type 'working com. Changgou. Goods. Feign. SkuFeign' in your configuration.
This is to start the class SearchApplication
@ SpringBootApplication (exclude=DataSourceAutoConfiguration. Class)
@ EnableEurekaClient
@ EnableFeignClients (basePackages="com. Changgou. Goods. Feign")
@ EnableElasticsearchRepositories (basePackages="com. Changgou. Search. Dao")
Public class SearchApplication {
Public static void main (String [] args) {
Ty System. SetProperty (" es.set.net. Runtime. The available. Processors ", "false");
SpringApplication. Run (SearchApplication. Class, args);
}
}
The following is SkuFeign
@ FeignClient (value="https://bbs.csdn.net/topics/goods")
@ RequestMapping ("/sku ")
Public interface SkuFeign {
/* *
* to track the status of qualified SKU list
* @ param status
* @ return
*/
@ GetMapping ("/status/{status} ")
Public ResultFindByStatus (@ PathVariable (name="status") String status);
}
Start the class is on the outermost but still an error with bosses know
CodePudding user response:
To put the reference SkuFeign posted