-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added ServiceArea service #25
Conversation
src/main/java/com/sarapis/orservice/controller/ServiceAreaController.java
Show resolved
Hide resolved
private final ServiceAreaService serviceAreaService; | ||
|
||
@Autowired | ||
public ServiceAreaController(ServiceAreaService serviceAreaService) { //stack overflow the dependency injection paste error and then @autowire |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Delete the stack overflow comment
|
||
@GetMapping | ||
public ResponseEntity<List<ServiceAreaDTO>> getAllServiceAreas() { | ||
List<ServiceAreaDTO> serviceAreaDTOs = this.serviceAreaService.getAllServiceAreas(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need to use this
when calling the serviceAreaService
as you already set the attribute in the Constructor of the class. Please change it to serviceAreaService
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment for every other usage of serviceAreaService
@vinrran I tested in my local and the service started successfully. Left some small Just for my edification, can you explain how did you solve the |
@miguel-merlin I'm not entirely sure, but most likely the error was resolved after I completed the This is a screenshot after I comment out everything in the |
@vinrran Thanks for the clarification! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm! NIce job!
Issue #18