Access the full course here: javabrains.io/courses/spring_bootquickstart
Learn how to create a Spring business service with the @Service annotation.
3 Comments on "Spring Boot Quick Start 17 – Creating a business service"
How can we directly use the getAllTopics method in the service when it's not a static method?
Sir can you tell best way to learn spring boot any other channel than this one.
that is the reason why he used the object instead of class itself. topicService.getAllTopics() instead of TopicService.getAllTopics(). And if you see that the instance for topicService is created with an annotation @Autowired which is what creates instance equivalent to TopicService topicService = new TopicService(); Hope it helps
In CodeChannels.com, you can learn to code by watching videos and stay up to date with latest code shows, events and tutorials aggregated from various leading developer communities.
Copyright 2016 By CodeChannels.com All rights reserved.