Home > Back-end >  Required Field XXX a bean of type 'XXXX' that could not be found. The start-up failure
Required Field XXX a bean of type 'XXXX' that could not be found. The start-up failure

Time:09-16

Field skuFeign in com. Changgou. Search. Service. Impl. SkuServiceImpl required a bean of type 'working com. Changgou. Goods. Feign. SkuFeign' that could not be found.

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 Result FindByStatus (@ 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
  • Related