8 java intellij-idea lombok spring-boot
I'm learning about Lombok and I have this error: Variable productRespository might not have been initialized. But I have the @RequiredArgsConstructor. And I'm using Intellij idea. So why do I need to create a constructor if I'm using this annotation? Thank you!
import lombok.RequiredArgsConstructor;
@RequiredArgsConstructor
@Service
public class ProductService {
private final ProductRespository productRespository;
...
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6621 次 |
| 最近记录: |