The application is Spring Boot Kotlin
My Controller class
@XRayEnabled
@RestController
open class MyController(private val service: MyService) {
@GetMapping("/account")
fun getAccount(@RequestHeader("auth") token: String, @RequestBody account: AccountQuery): ResponseEntity<AccountDetail> = ResponseEntity.ok(service.getAccount(token, account))
}
My service class
@XRayEnabled
@Service
open class MyService(private val client: FeignClient) {
fun getAccount(token: String, account: AccountQuery): AccountDetail = client.getAccount(token, account)
}
When I access the API endpoint, I got "this.service" is null, how do I inject service into my controller