Open AnanthaRajuC opened 6 years ago
In the following class
package com.kaviddiss.streamkafka.web; import com.kaviddiss.streamkafka.model.Greetings; import com.kaviddiss.streamkafka.service.GreetingsService; import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; @RestController public class GreetingsController { private final GreetingsService greetingsService; public GreetingsController(GreetingsService greetingsService) { this.greetingsService = greetingsService; } @GetMapping("/greetings") @ResponseStatus(HttpStatus.ACCEPTED) public void greetings(@RequestParam("message") String message) { Greetings greetings = Greetings.builder() .message(message) .timestamp(System.currentTimeMillis()) .build(); greetingsService.sendGreeting(greetings); } }
I'm getting an error The method builder() is undefined for the type Greetings
Make sure you have the Lombok plugin installed in your IDE and if you're using Intellij, you'll also need to enable annotation processing
worked!
In the following class
I'm getting an error The method builder() is undefined for the type Greetings