Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:01,135 --> 00:00:01,968
Instructor: In this video,
2
00:00:01,968 --> 00:00:03,780
we're gonna learn about constructor injection
3
00:00:03,780 --> 00:00:06,273
and how it works behind the scenes.
4
00:00:09,300 --> 00:00:12,840
Now, how does Spring process your application?
5
00:00:12,840 --> 00:00:14,610
We have our interface for coach,
6
00:00:14,610 --> 00:00:16,410
we have our cricket coach implementation,
7
00:00:16,410 --> 00:00:18,393
and then we have our demo controller.
8
00:00:21,390 --> 00:00:24,270
And so the Spring framework will perform operations for you
9
00:00:24,270 --> 00:00:27,573
behind the scenes for processing these items.
10
00:00:31,860 --> 00:00:34,740
Behind the scenes, Spring will create a new instance
11
00:00:34,740 --> 00:00:37,020
of your coach, new cricket coach.
12
00:00:37,020 --> 00:00:39,420
It'll also perform constructor injection
13
00:00:39,420 --> 00:00:40,950
with your demo controller.
14
00:00:40,950 --> 00:00:44,160
It'll actually inject the coach into the demo controller.
15
00:00:44,160 --> 00:00:46,200
And remember, the whole idea of injection is
16
00:00:46,200 --> 00:00:48,510
that there's a dependency or a helper.
17
00:00:48,510 --> 00:00:51,900
So in this case, the coach is a dependency or a helper
18
00:00:51,900 --> 00:00:53,373
for the actual controller.
19
00:00:56,340 --> 00:00:57,780
The new keyword, is that it?
20
00:00:57,780 --> 00:01:01,680
So you're probably wondering, is it just the new keyword?
21
00:01:01,680 --> 00:01:06,680
I really don't need Spring for this. I could do this myself.
22
00:01:06,990 --> 00:01:09,570
Okay, and you're saying, what's the point of Spring
23
00:01:09,570 --> 00:01:11,010
if it's just the new keyword?
24
00:01:11,010 --> 00:01:13,200
Come on. It has to be more to it than that.
25
00:01:13,200 --> 00:01:14,460
Well, it actually is.
26
00:01:14,460 --> 00:01:17,460
So Spring is more than just inversion of control
27
00:01:17,460 --> 00:01:20,130
and it's more than just dependency injection.
28
00:01:20,130 --> 00:01:22,680
For small basic applications like we're building here,
29
00:01:22,680 --> 00:01:25,653
it may be hard to see the real benefits of Spring.
30
00:01:28,860 --> 00:01:31,800
But now, Spring is designed for enterprise applications.
31
00:01:31,800 --> 00:01:33,690
All right, so it's targeted for enterprise,
32
00:01:33,690 --> 00:01:36,060
real-time, real-world applications.
33
00:01:36,060 --> 00:01:38,820
And Spring provides features such as database access
34
00:01:38,820 --> 00:01:43,820
and transactions, REST APIs, Web MVC, security, and so on.
35
00:01:45,150 --> 00:01:45,983
Later in the course,
36
00:01:45,983 --> 00:01:50,310
we'll build a real CRUD REST API with database access
37
00:01:50,310 --> 00:01:52,710
and so you'll see these Spring features in action.
38
00:01:52,710 --> 00:01:54,720
So a lot of good things are coming.
39
00:01:54,720 --> 00:01:57,810
So again, Spring is more than just ILC MDI.
40
00:01:57,810 --> 00:01:59,370
There's a lot of other really good features
41
00:01:59,370 --> 00:02:01,220
that you can make use of with Spring.
3337
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.