In this simple hands on example, we create a service class, DTO, and show how to use @Autowired and @Component to link them up to our Spring Boot controller. Then, we extract an interface from the service class, and show how @Autowired still works, even when variable type differs from object type. This shows the value of polymorphism, where variable type tells you what methods you are allowed to call, and object type tells you what will happen when you call those methods.
This video is part of a playlist on building Full Stack Enterprise Applications with Microservices in Java, available here: • Overview of our Sample Microservice E...
Source code is freely available on GitHub at: https://github.com/discospiff/SpringB...
Смотрите видео Simple Autowired Component example in Spring Boot онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Brandan Jones 11 Сентябрь 2018, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 3,732 раз и оно понравилось 34 людям.