openfeign

Error only with maven: NoClassDefFoundError: feign/codec/Encoder

白昼怎懂夜的黑 提交于 2021-02-05 11:26:27
问题 I created a project in Eclipse with the Maven wizard and edited the pom.xml file to include my dependencies. My project, which uses Open Feign, builds and runs in Eclipse, but I get the following runtime error when I build it at the command line with Maven: Error: Unable to initialize main class edu.mills.cs180a.BookRepositoryImplFeign Caused by: java.lang.NoClassDefFoundError: feign/codec/Encoder Here is my pom.xml file: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http:/

Error only with maven: NoClassDefFoundError: feign/codec/Encoder

别说谁变了你拦得住时间么 提交于 2021-02-05 11:26:10
问题 I created a project in Eclipse with the Maven wizard and edited the pom.xml file to include my dependencies. My project, which uses Open Feign, builds and runs in Eclipse, but I get the following runtime error when I build it at the command line with Maven: Error: Unable to initialize main class edu.mills.cs180a.BookRepositoryImplFeign Caused by: java.lang.NoClassDefFoundError: feign/codec/Encoder Here is my pom.xml file: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http:/

Feign Client fails to compile, it treats BindingResult as a second Body parameter

走远了吗. 提交于 2021-01-28 19:33:30
问题 I'm learning to use Spring's Feign Client, so I've built two simple projects (serviceA and serviceB) to test it out. I have the following code: serviceA rest interface: @RequestMapping("/users") public interface UserRest { @PostMapping public ResponseEntity<User> createUser(@Valid @RequestBody User user, BindingResult br); } serviceA rest interface implementation: @RestController public class UserController implements UserRest { @Override @PostMapping public ResponseEntity<User> createUser(

How to pass Pageable to Feign Client in POST Request with additional @RequestBody

心不动则不痛 提交于 2020-08-05 09:38:12
问题 I tried to create a feign client for my REST service controller in Spring. @PostMapping("/search") public Page<MeasureDto> searchMeasures(@RequestBody MeasureDto example, Pageable pageable) { ... } The client looks like this: @PostMapping("/search") public Page<MeasureDto> searchMeasures(@RequestHeader("apiKey") String apiKey, @RequestBody MeasureDto example, Pageable pageable); Following exception is thrown when running a test: Caused by: java.lang.IllegalStateException: Method has too many