title
Spring Boot Tutorial for Beginners (Java Framework)
description
Learn Spring Boot in this full course for beginners. Spring Boot is an amazing framework for building Java applications. It makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run".
💻 Code: https://github.com/amigoscode/spring-boot-react-fullstack
✏️ Course from Amigoscode.
🔗 Subscribe to Amigoscode YouTube channel: http://bit.ly/2HpF5V8
🔗 Full Stack Spring Boot | React | Postgres Course: http://bit.ly/2NGmUx3
🔗 Visit Amigoscode.com for more courses: http://bit.ly/2JgGW0w
🔗 Follow Amigoscode on Instagram: http://bit.ly/2TSkA9w
🔗 Join Amigoscode Closed Facebook Group: http://bit.ly/2FbuIkx
--
Learn to code for free and get a developer job: https://www.freecodecamp.org
Read hundreds of articles on programming: https://medium.freecodecamp.org
detail
{'title': 'Spring Boot Tutorial for Beginners (Java Framework)', 'heatmap': [{'end': 466.497, 'start': 391.192, 'weight': 0.855}, {'end': 991.801, 'start': 912.153, 'weight': 1}, {'end': 1322.345, 'start': 1243.896, 'weight': 0.846}, {'end': 2039.817, 'start': 1969.086, 'weight': 0.924}, {'end': 3613.833, 'start': 3543.051, 'weight': 0.709}], 'summary': 'This spring boot tutorial covers the setup, configuration, and implementation of rest apis in java, including connecting to a real postgres database, managing database operations, and configuring data source with docker, resulting in successful api creation and database connectivity.', 'chapters': [{'end': 371.522, 'segs': [{'end': 95.524, 'src': 'embed', 'start': 0.169, 'weight': 0, 'content': [{'end': 1.83, 'text': 'Hi, welcome to Amigos Code.', 'start': 0.169, 'duration': 1.661}, {'end': 2.631, 'text': 'My name is Nelson.', 'start': 1.89, 'duration': 0.741}, {'end': 7.593, 'text': "And in this crash course, I'm going to teach you everything you need to know about Spring Boot.", 'start': 2.711, 'duration': 4.882}, {'end': 13.197, 'text': 'Spring Boot is an amazing framework for building Java applications very fast.', 'start': 7.994, 'duration': 5.203}, {'end': 19.26, 'text': "Recently, Netflix just announced that they'll be switching their entire backend to Spring Boot.", 'start': 13.957, 'duration': 5.303}, {'end': 26.945, 'text': "And this is because Spring Boot is so solid that there's no need for you to reinvent the wheel.", 'start': 20.101, 'duration': 6.844}, {'end': 33.852, 'text': 'So they provide things such as connectivity to databases, Jetty servers, metrics,', 'start': 27.845, 'duration': 6.007}, {'end': 41.662, 'text': 'configuration and pretty much instead of you having to configure the low level code to get up and running,', 'start': 33.852, 'duration': 7.81}, {'end': 45.787, 'text': 'you can simply use Spring Boot and get off the ground very quick.', 'start': 41.662, 'duration': 4.125}, {'end': 55.63, 'text': "So first I'm going to show you exactly how to use Spring Boot dependency injection and how to implement to an interface where we will have an in memory database.", 'start': 46.287, 'duration': 9.343}, {'end': 62.153, 'text': "And then I'm going to show you exactly how to connect to a real database running on Docker.", 'start': 56.21, 'duration': 5.943}, {'end': 66.114, 'text': "So without further ado, let's get started.", 'start': 63.013, 'duration': 3.101}, {'end': 70.475, 'text': 'All right, Amigos, welcome to Amigos code.', 'start': 67.634, 'duration': 2.841}, {'end': 74.917, 'text': 'In this video, I want to teach you exactly how to use Spring Boot 2.0.', 'start': 70.555, 'duration': 4.362}, {'end': 81.059, 'text': 'Spring Boot is by far one of the best frameworks for building applications in the Java world.', 'start': 74.917, 'duration': 6.142}, {'end': 85.22, 'text': 'So if you want to build an enterprise application, you can use Spring Boot.', 'start': 81.599, 'duration': 3.621}, {'end': 95.524, 'text': 'Or if you want to prototype an idea and see whether it works, then you can use Spring Boot because it makes it very easy to build applications.', 'start': 85.68, 'duration': 9.844}], 'summary': 'Spring boot is a fast framework for java, used by netflix, providing easy setup and database connectivity.', 'duration': 95.355, 'max_score': 0.169, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ169.jpg'}, {'end': 164.077, 'src': 'embed', 'start': 140.865, 'weight': 6, 'content': [{'end': 149.049, 'text': 'after you perform some business logic, then you might decide to use a database to perform some various current operations.', 'start': 140.865, 'duration': 8.184}, {'end': 152.591, 'text': 'And basically, so this layer right here.', 'start': 149.93, 'duration': 2.661}, {'end': 157.354, 'text': 'So this layer is responsible to connect to any database of your choice.', 'start': 153.051, 'duration': 4.303}, {'end': 164.077, 'text': 'So the cool thing about Spring Boot and dependency injection is that you can start with an implementation.', 'start': 158.314, 'duration': 5.763}], 'summary': 'The spring boot layer facilitates database connectivity and offers flexibility in choosing database implementation.', 'duration': 23.212, 'max_score': 140.865, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ140865.jpg'}, {'end': 253.021, 'src': 'embed', 'start': 219.861, 'weight': 1, 'content': [{'end': 221.622, 'text': "So let's go ahead and get started.", 'start': 219.861, 'duration': 1.761}, {'end': 228.586, 'text': 'So the very first thing that I want you to do is to navigate to this website, start Spring IO.', 'start': 222.102, 'duration': 6.484}, {'end': 234.149, 'text': "And basically this website, you can see that it's title Spring Initializer.", 'start': 228.606, 'duration': 5.543}, {'end': 241.353, 'text': 'It basically allows you to bootstrap your application by picking dependencies and configuring the actual project.', 'start': 234.549, 'duration': 6.804}, {'end': 245.275, 'text': 'So go ahead and generate a project with Maven.', 'start': 242.093, 'duration': 3.182}, {'end': 246.876, 'text': 'But you can see that you can pick Gradle.', 'start': 245.475, 'duration': 1.401}, {'end': 253.021, 'text': 'And then you have the option to code with Java Kotlin or Groovy.', 'start': 247.496, 'duration': 5.525}], 'summary': 'Spring initializer website allows bootstrapping projects with maven or gradle, and coding in java, kotlin, or groovy.', 'duration': 33.16, 'max_score': 219.861, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ219861.jpg'}, {'end': 331.099, 'src': 'embed', 'start': 297.625, 'weight': 7, 'content': [{'end': 302.568, 'text': "But if you don't have Java 11, go ahead and pick Java 8 because it will also work.", 'start': 297.625, 'duration': 4.943}, {'end': 308.67, 'text': 'Then if you scroll down, you can see that right here you have a bunch of dependencies.', 'start': 303.448, 'duration': 5.222}, {'end': 315.353, 'text': 'And this is why Spring Boot is pretty much one of the best Java frameworks for building applications.', 'start': 309.21, 'duration': 6.143}, {'end': 321.135, 'text': 'So they give you a lot of flexibility with these dependencies,', 'start': 315.793, 'duration': 5.342}, {'end': 331.099, 'text': 'which simply means that you can install one of these dependencies and start coding right away instead of you having to configuring and setting up things.', 'start': 321.135, 'duration': 9.964}], 'summary': 'Spring boot is flexible with dependencies, allowing quick coding and setup.', 'duration': 33.474, 'max_score': 297.625, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ297625.jpg'}], 'start': 0.169, 'title': 'Spring boot for java apps', 'summary': 'Introduces spring boot as an efficient framework for building java applications, highlighting its adoption by netflix and its capabilities for fast backend development, including dependency injection, in-memory and real database connectivity, and layer-based request handling. it covers the process of setting up a spring boot java application, including choosing dependencies, configuring project metadata, and utilizing the flexibility of spring boot in implementing various functionalities, aiming to equip viewers with the knowledge to comfortably build backend applications with spring boot.', 'chapters': [{'end': 193.853, 'start': 0.169, 'title': 'Spring boot: building java apps fast', 'summary': 'Introduces spring boot as an efficient framework for building java applications, highlighting its adoption by netflix and its capabilities for fast backend development, including dependency injection, in-memory and real database connectivity, and layer-based request handling.', 'duration': 193.684, 'highlights': ['Spring Boot is adopted by Netflix for their entire backend, showcasing its solid framework and efficiency.', 'Spring Boot provides connectivity to databases, Jetty servers, metrics, and configuration, enabling quick setup without low-level code configuration.', 'The chapter covers implementing dependency injection and in-memory database usage, as well as connecting to a real database running on Docker.', "Explains the layer-based request handling and the service layer's responsibility for business logic and database connections, highlighting the flexibility of dependency injection for switching databases."]}, {'end': 371.522, 'start': 194.454, 'title': 'Spring boot java application', 'summary': 'Covers the process of setting up a spring boot java application, including choosing dependencies, configuring project metadata, and utilizing the flexibility of spring boot in implementing various functionalities, aiming to equip viewers with the knowledge to comfortably build backend applications with spring boot.', 'duration': 177.068, 'highlights': ["The website 'start.spring.io' allows users to bootstrap their application by selecting dependencies and configuring the project, providing flexibility in setting up the project and enabling ease in starting to code.", 'Spring Boot offers a variety of dependencies for functionalities such as web applications, security, and SQL, simplifying the implementation process and enabling quick start in coding.', 'The tutorial emphasizes the importance of using the latest version of Spring Boot, specifically version 2.0 and above, to ensure compatibility with the latest projects and features, encouraging users to stay updated with the framework versions for optimal utilization.', 'The chapter provides guidance on selecting the appropriate Java version, recommending Java 11 for those with the latest version installed and Java 8 for those without, ensuring compatibility and functionality for different user scenarios.']}], 'duration': 371.353, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ169.jpg', 'highlights': ['Spring Boot is adopted by Netflix for their entire backend, showcasing its solid framework and efficiency.', "The website 'start.spring.io' allows users to bootstrap their application by selecting dependencies and configuring the project, providing flexibility in setting up the project and enabling ease in starting to code.", 'Spring Boot provides connectivity to databases, Jetty servers, metrics, and configuration, enabling quick setup without low-level code configuration.', 'Spring Boot offers a variety of dependencies for functionalities such as web applications, security, and SQL, simplifying the implementation process and enabling quick start in coding.', 'The chapter covers implementing dependency injection and in-memory database usage, as well as connecting to a real database running on Docker.', 'The tutorial emphasizes the importance of using the latest version of Spring Boot, specifically version 2.0 and above, to ensure compatibility with the latest projects and features, encouraging users to stay updated with the framework versions for optimal utilization.', "Explains the layer-based request handling and the service layer's responsibility for business logic and database connections, highlighting the flexibility of dependency injection for switching databases.", 'The chapter provides guidance on selecting the appropriate Java version, recommending Java 11 for those with the latest version installed and Java 8 for those without, ensuring compatibility and functionality for different user scenarios.']}, {'end': 1562.65, 'segs': [{'end': 466.497, 'src': 'heatmap', 'start': 391.192, 'weight': 0.855, 'content': [{'end': 395.454, 'text': 'So web server, web applications with Spring MVC and Tomcat.', 'start': 391.192, 'duration': 4.262}, {'end': 398.756, 'text': "So I'm going to take that and then generate a project.", 'start': 396.155, 'duration': 2.601}, {'end': 404.336, 'text': "So right here you see that I've got this demo zip which I'm going to open in my desktop.", 'start': 400.171, 'duration': 4.165}, {'end': 406.619, 'text': 'There you go.', 'start': 406.179, 'duration': 0.44}, {'end': 411.285, 'text': "So now I'm going to click on this zip folder.", 'start': 407.02, 'duration': 4.265}, {'end': 419.553, 'text': 'And if I delete the actual zip, you can see that now I have this folder right here.', 'start': 413.349, 'duration': 6.204}, {'end': 424.697, 'text': "So for this video, I'm going to be using IntelliJ, which is by far the best IDE.", 'start': 420.154, 'duration': 4.543}, {'end': 432.102, 'text': 'And if you want to learn about IntelliJ, go ahead and check my video on YouTube, which I show you how to download,', 'start': 425.417, 'duration': 6.685}, {'end': 434.543, 'text': 'install and configure IntelliJ properly.', 'start': 432.102, 'duration': 2.441}, {'end': 439.427, 'text': 'And if you are using NetBeans or Eclipse, this will also work.', 'start': 435.404, 'duration': 4.023}, {'end': 442.348, 'text': 'So inside of IntelliJ.', 'start': 440.267, 'duration': 2.081}, {'end': 447.25, 'text': "So I actually recommend you to download and install IntelliJ if you don't have it to follow along.", 'start': 442.508, 'duration': 4.742}, {'end': 451.492, 'text': "And I'm pretty sure that you're going to learn great things with IntelliJ throughout this video.", 'start': 447.33, 'duration': 4.162}, {'end': 466.497, 'text': "So what I'm going to do now is pretty much click on open and then navigate to desktop and then open up this demo folder and then open up the actual Palm dot XML.", 'start': 452.112, 'duration': 14.385}], 'summary': 'Demonstrating project setup using spring mvc and tomcat in intellij.', 'duration': 75.305, 'max_score': 391.192, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ391192.jpg'}, {'end': 535.461, 'src': 'embed', 'start': 476.649, 'weight': 1, 'content': [{'end': 479.856, 'text': 'Maven is resolving the dependencies for this project.', 'start': 476.649, 'duration': 3.207}, {'end': 481.791, 'text': 'There we go.', 'start': 481.331, 'duration': 0.46}, {'end': 483.532, 'text': "So that's nice and done.", 'start': 481.931, 'duration': 1.601}, {'end': 487.374, 'text': "So let's go ahead and explore this project.", 'start': 484.233, 'duration': 3.141}, {'end': 496.319, 'text': 'So open up demo and inside demo, you can see that I have a couple of folders, but the ones that we really care about are the Palm dot XML.', 'start': 487.654, 'duration': 8.665}, {'end': 504.944, 'text': 'So if I open that up, you can see that this is what you saw when configuring the project with spring initializer.', 'start': 496.459, 'duration': 8.485}, {'end': 512.308, 'text': 'So you saw the group ID artifact name and then version.', 'start': 505.404, 'duration': 6.904}, {'end': 513.727, 'text': 'So this is the version right here.', 'start': 512.347, 'duration': 1.38}, {'end': 516.95, 'text': 'And then this is Java 11.', 'start': 514.349, 'duration': 2.601}, {'end': 521.113, 'text': 'And basically the actual dependency that we picked was this one right here.', 'start': 516.95, 'duration': 4.163}, {'end': 522.854, 'text': 'So Spring Boot starter web.', 'start': 521.193, 'duration': 1.661}, {'end': 531.338, 'text': 'And by default, Spring Boot ships with Spring Boot starter test for writing unit and integration tests.', 'start': 523.433, 'duration': 7.905}, {'end': 535.461, 'text': "So go ahead and close this because we don't need it.", 'start': 532.159, 'duration': 3.302}], 'summary': 'Maven resolved dependencies, project explored with spring boot starter web and test, using java 11.', 'duration': 58.812, 'max_score': 476.649, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ476649.jpg'}, {'end': 592.417, 'src': 'embed', 'start': 569.606, 'weight': 0, 'content': [{'end': 579.11, 'text': 'You should see that I have spring up and running and you can see that it says that Tomcat started on Port 8080.', 'start': 569.606, 'duration': 9.504}, {'end': 583.392, 'text': 'So right here we could change this port, but this is the default port for Tomcat.', 'start': 579.11, 'duration': 4.282}, {'end': 588.595, 'text': "So I'm going to stop this and you can see that everything is up and running fine.", 'start': 584.253, 'duration': 4.342}, {'end': 592.417, 'text': "So I'm going to stop this and then collapse this.", 'start': 588.615, 'duration': 3.802}], 'summary': 'Spring is up and running on tomcat, default port 8080.', 'duration': 22.811, 'max_score': 569.606, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ569606.jpg'}, {'end': 666.169, 'src': 'embed', 'start': 618.687, 'weight': 3, 'content': [{'end': 622.609, 'text': 'So this is where all the properties for your application do live.', 'start': 618.687, 'duration': 3.922}, {'end': 628.996, 'text': 'And the cool thing about properties is that you can define properties for different environments.', 'start': 623.369, 'duration': 5.627}, {'end': 637.547, 'text': 'So you could have a demo environment, a test environment and a production environment with different values for the actual properties.', 'start': 629.016, 'duration': 8.531}, {'end': 639.069, 'text': "So it's pretty cool.", 'start': 637.987, 'duration': 1.082}, {'end': 641.031, 'text': "So I'm going to cancel out of that.", 'start': 639.73, 'duration': 1.301}, {'end': 649.577, 'text': 'And now that you know the actual structure and make sure that you can start the application,', 'start': 642.172, 'duration': 7.405}, {'end': 654.041, 'text': "you've successfully managed to start a Tomcat server with Spring Boot.", 'start': 649.577, 'duration': 4.464}, {'end': 666.169, 'text': "So now let's go ahead and implement our API with all of those resources, controllers, services and defining a database as well.", 'start': 654.701, 'duration': 11.468}], 'summary': 'Properties can be defined for different environments, enabling customization; tomcat server with spring boot started successfully; next step is to implement api with resources, controllers, services, and a database.', 'duration': 47.482, 'max_score': 618.687, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ618687.jpg'}, {'end': 727.777, 'src': 'embed', 'start': 696.458, 'weight': 6, 'content': [{'end': 704.802, 'text': "So if I remove that, Basically, let's put just a dot so we know where we are with things.", 'start': 696.458, 'duration': 8.344}, {'end': 707.043, 'text': 'So right here.', 'start': 705.743, 'duration': 1.3}, {'end': 710.506, 'text': 'And then if I collapse that.', 'start': 708.404, 'duration': 2.102}, {'end': 716.87, 'text': "So basically we're going to implement this section first and then move our way up.", 'start': 711.146, 'duration': 5.724}, {'end': 727.777, 'text': "So basically we're going to implement one step at a time and then see everything working fine and then implement some other functionality.", 'start': 717.45, 'duration': 10.327}], 'summary': 'Implementing the section first, then moving up step by step to ensure everything works fine.', 'duration': 31.319, 'max_score': 696.458, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ696458.jpg'}, {'end': 880.358, 'src': 'embed', 'start': 852.773, 'weight': 7, 'content': [{'end': 859.341, 'text': "You can find the link in the description below where you can download and see exactly everything that we're doing here.", 'start': 852.773, 'duration': 6.568}, {'end': 861.784, 'text': 'So basically the actual model.', 'start': 859.922, 'duration': 1.862}, {'end': 867.83, 'text': 'So the model for this tutorial will be a person.', 'start': 862.986, 'duration': 4.844}, {'end': 871.072, 'text': 'And basically a person will have an ID.', 'start': 868.331, 'duration': 2.741}, {'end': 872.213, 'text': 'So an ID.', 'start': 871.453, 'duration': 0.76}, {'end': 880.358, 'text': "And let's keep things simple and have like, let's say a full name just like that.", 'start': 873.234, 'duration': 7.124}], 'summary': 'Tutorial model: person with id and full name', 'duration': 27.585, 'max_score': 852.773, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ852773.jpg'}, {'end': 991.801, 'src': 'heatmap', 'start': 912.153, 'weight': 1, 'content': [{'end': 921.519, 'text': 'So now simply go ahead and say private final and then the ID will be of type UID and simply call the ID.', 'start': 912.153, 'duration': 9.366}, {'end': 926.002, 'text': 'Go ahead and say private final and then string.', 'start': 922.319, 'duration': 3.683}, {'end': 927.302, 'text': 'So this is the actual name.', 'start': 926.062, 'duration': 1.24}, {'end': 930.766, 'text': "And then I'm going to add these two constructors.", 'start': 928.343, 'duration': 2.423}, {'end': 936.152, 'text': "So you can see I'm using keyboard shortcuts again and then the getters.", 'start': 930.786, 'duration': 5.366}, {'end': 937.614, 'text': 'So just like that.', 'start': 936.573, 'duration': 1.041}, {'end': 938.835, 'text': 'And there we go.', 'start': 938.315, 'duration': 0.52}, {'end': 942.34, 'text': 'So now we have a model that we can work with.', 'start': 939.136, 'duration': 3.204}, {'end': 945.24, 'text': 'So If I go back.', 'start': 943.241, 'duration': 1.999}, {'end': 950.204, 'text': 'So now we have to define the actual database section right here.', 'start': 945.34, 'duration': 4.864}, {'end': 958.052, 'text': "Right So let's define the actual interface that will allow us to have any implementation for our database.", 'start': 950.385, 'duration': 7.667}, {'end': 966.6, 'text': 'So inside of the DAO, go ahead and create a class and then simply say person and then DAO.', 'start': 958.673, 'duration': 7.927}, {'end': 970.704, 'text': 'So instead of a class, change this to an interface.', 'start': 967.421, 'duration': 3.283}, {'end': 982.933, 'text': "And this is the actual interface where we're going to define the operations allowed or the actual contract for anyone that wishes to implement this interface.", 'start': 971.384, 'duration': 11.549}, {'end': 991.801, 'text': 'And the cool thing about it is that we can then use dependency injection to switch between implementations with just one line of code.', 'start': 983.494, 'duration': 8.307}], 'summary': 'Creating model with id and name, defining database interface using dependency injection.', 'duration': 79.648, 'max_score': 912.153, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ912153.jpg'}, {'end': 1127.412, 'src': 'embed', 'start': 1090.763, 'weight': 8, 'content': [{'end': 1093.866, 'text': 'And the ID is simply randomly generated.', 'start': 1090.763, 'duration': 3.103}, {'end': 1099.267, 'text': "Now let's go ahead and create a class that will implement this interface.", 'start': 1094.426, 'duration': 4.841}, {'end': 1114.612, 'text': 'So open up the DAO package and then simply create a class and call it person and call it fake and then person data access and then service.', 'start': 1099.868, 'duration': 14.744}, {'end': 1121.706, 'text': 'And then this guy implements and then person DAO just like that.', 'start': 1116.161, 'duration': 5.545}, {'end': 1123.588, 'text': 'And then implement the methods.', 'start': 1122.067, 'duration': 1.521}, {'end': 1127.412, 'text': 'And we need to implement insert person.', 'start': 1124.629, 'duration': 2.783}], 'summary': 'Creating a class to implement an interface for person data access, including method insert person', 'duration': 36.649, 'max_score': 1090.763, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ1090763.jpg'}, {'end': 1225.15, 'src': 'embed', 'start': 1196.474, 'weight': 10, 'content': [{'end': 1202.521, 'text': 'So inside of the service package, go ahead and create a new class and then simply call it person and then service.', 'start': 1196.474, 'duration': 6.047}, {'end': 1210.847, 'text': "And right here inside of this class, let's simply have a method to insert a new person.", 'start': 1204.403, 'duration': 6.444}, {'end': 1218.053, 'text': 'So simply go ahead and say public and then int and then add and then person.', 'start': 1211.548, 'duration': 6.505}, {'end': 1220.755, 'text': 'Basically, this will take a person.', 'start': 1219.013, 'duration': 1.742}, {'end': 1225.15, 'text': 'And what we want to do is simply say return.', 'start': 1222.349, 'duration': 2.801}], 'summary': "Create a new 'person' class in the service package with a method to insert a new person.", 'duration': 28.676, 'max_score': 1196.474, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ1196474.jpg'}, {'end': 1355.787, 'src': 'heatmap', 'start': 1243.896, 'weight': 11, 'content': [{'end': 1251.418, 'text': "So don't get the actual fake person data access service because I want to show you exactly how to use dependency injection.", 'start': 1243.896, 'duration': 7.522}, {'end': 1255.639, 'text': 'So then what we need to do is add this to the constructor.', 'start': 1252.098, 'duration': 3.541}, {'end': 1262.221, 'text': 'And now we can simply say person DAO dot and then insert and then person.', 'start': 1256.179, 'duration': 6.042}, {'end': 1265.183, 'text': 'So remember, we had two methods.', 'start': 1263.141, 'duration': 2.042}, {'end': 1272.551, 'text': 'And if I go back to my interface, so person and in fact, I need to call this the same.', 'start': 1265.323, 'duration': 7.228}, {'end': 1273.672, 'text': "So let's be consistent.", 'start': 1272.631, 'duration': 1.041}, {'end': 1274.493, 'text': 'So person.', 'start': 1273.752, 'duration': 0.741}, {'end': 1275.914, 'text': 'So insert person, actually.', 'start': 1274.693, 'duration': 1.221}, {'end': 1278.076, 'text': 'So now you can see that the error went away.', 'start': 1276.575, 'duration': 1.501}, {'end': 1281.78, 'text': 'So basically, we have the option of providing the ID or not.', 'start': 1278.236, 'duration': 3.544}, {'end': 1289.164, 'text': "So in this case, let's go ahead and have it randomly generated because we don't care.", 'start': 1283.081, 'duration': 6.083}, {'end': 1292.786, 'text': 'But if you need to generate the ID yourself, you know that you can do it.', 'start': 1289.304, 'duration': 3.482}, {'end': 1298.748, 'text': "So now that we have the service done, let's go ahead and implement the actual API.", 'start': 1293.666, 'duration': 5.082}, {'end': 1306.774, 'text': 'So Inside of the API package, go ahead and create class and simply call it person and then resource.', 'start': 1298.869, 'duration': 7.905}, {'end': 1309.335, 'text': "Or actually, let's go ahead and say controller.", 'start': 1307.454, 'duration': 1.881}, {'end': 1315.139, 'text': 'So in Spring Boot World, we tend to name these as controllers.', 'start': 1309.816, 'duration': 5.323}, {'end': 1322.345, 'text': "And then simply say, okay, And then let's go ahead and also have a reference to the actual service.", 'start': 1315.399, 'duration': 6.946}, {'end': 1326.108, 'text': 'So private, final and in person service.', 'start': 1322.585, 'duration': 3.523}, {'end': 1331.332, 'text': 'And then right here, we need to add this to the constructor.', 'start': 1327.649, 'duration': 3.683}, {'end': 1336.176, 'text': "And then let's simply go ahead and have a method that adds a person.", 'start': 1331.352, 'duration': 4.824}, {'end': 1339.918, 'text': 'So public and then simply say void.', 'start': 1336.816, 'duration': 3.102}, {'end': 1342.559, 'text': "So we don't want to return an integer in this case.", 'start': 1340.138, 'duration': 2.421}, {'end': 1347.642, 'text': 'So we want to return a status code of 200.', 'start': 1344, 'duration': 3.642}, {'end': 1350.344, 'text': 'Or if anything fails, we can pretty much throw an exception.', 'start': 1347.642, 'duration': 2.702}, {'end': 1355.787, 'text': 'Or you could also have your custom exceptions if you wish.', 'start': 1351.224, 'duration': 4.563}], 'summary': 'Demonstrating dependency injection and implementing api with spring boot', 'duration': 56.918, 'max_score': 1243.896, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ1243896.jpg'}, {'end': 1449.07, 'src': 'embed', 'start': 1416.76, 'weight': 12, 'content': [{'end': 1421.805, 'text': "And there's no way for this constructor to know about it.", 'start': 1416.76, 'duration': 5.045}, {'end': 1426.869, 'text': 'Right So this is where we use annotations to instantiate beans.', 'start': 1422.125, 'duration': 4.744}, {'end': 1431.774, 'text': 'So open up the fake person data access service.', 'start': 1427.57, 'duration': 4.204}, {'end': 1444.291, 'text': 'And the way that we tell spring that this class needs to be instantiated as a bean so that we can inject it in other classes is simply by saying at and then repository.', 'start': 1432.494, 'duration': 11.797}, {'end': 1449.07, 'text': 'Right So you could also say at and then component.', 'start': 1446.007, 'duration': 3.063}], 'summary': 'Using annotations to instantiate beans in spring for dependency injection.', 'duration': 32.31, 'max_score': 1416.76, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ1416760.jpg'}, {'end': 1506.396, 'src': 'embed', 'start': 1475.834, 'weight': 13, 'content': [{'end': 1480.78, 'text': 'So anyone looking at my code know exactly that this is a service.', 'start': 1475.834, 'duration': 4.946}, {'end': 1488.708, 'text': 'So now that we pretty much annotated the actual data access service.', 'start': 1481.801, 'duration': 6.907}, {'end': 1491.43, 'text': 'And right here we are injecting.', 'start': 1489.489, 'duration': 1.941}, {'end': 1494.711, 'text': 'Right So we are injecting into the actual constructor.', 'start': 1491.63, 'duration': 3.081}, {'end': 1500.533, 'text': 'So the way that we inject is simply saying at and then auto wired.', 'start': 1495.331, 'duration': 5.202}, {'end': 1506.396, 'text': 'So basically we are auto wiring into this interface.', 'start': 1501.174, 'duration': 5.222}], 'summary': 'Code is annotated to indicate service, utilizing auto-wiring for injection.', 'duration': 30.562, 'max_score': 1475.834, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ1475834.jpg'}], 'start': 371.642, 'title': 'Spring boot setup and api configuration', 'summary': 'Covers setting up a spring boot project with intellij, including dependencies, project import, and running the spring application on tomcat. it also discusses api structure setup, model definition, service implementation, and spring boot api configuration with annotations like @autowired and @qualifier.', 'chapters': [{'end': 592.417, 'start': 371.642, 'title': 'Setting up spring boot with intellij', 'summary': 'Covers setting up a spring boot project with intellij, including selecting dependencies, importing the project, and running the spring application on tomcat, with a default port of 8080.', 'duration': 220.775, 'highlights': ['Running Spring Boot application on Tomcat with default port 8080', 'Selecting Spring Boot starter web as a dependency', 'Importing and resolving dependencies with Maven in IntelliJ', 'Demonstrating the structure of the Spring Boot project']}, {'end': 829.501, 'start': 593.297, 'title': 'Setting up api and application structure', 'summary': 'Discusses setting up the api structure, including creating packages for api, model, service, and dao, and defining properties for different environments. it also covers starting a tomcat server with spring boot and implementing the api layer, controller layer, and service layer.', 'duration': 236.204, 'highlights': ['The chapter discusses setting up the API structure, including creating packages for API, model, service, and DAO.', 'It covers defining properties for different environments, allowing for the configuration of demo, test, and production environments with different property values.', 'The chapter also covers starting a Tomcat server with Spring Boot and implementing the API layer, controller layer, and service layer.', 'The speaker emphasizes implementing one step at a time, testing functionality, and gradually adding other features for a systematic approach to development.']}, {'end': 1298.748, 'start': 829.962, 'title': 'Defining model, interface, and service', 'summary': 'Covers defining a model for a person with an id and full name, creating a dao interface with insert and add methods, implementing the interface with a fake data access service, and creating a service to insert a new person using dependency injection.', 'duration': 468.786, 'highlights': ['Defining a model for a person with an ID and full name', 'Creating a DAO interface with insert and add methods', 'Implementing the interface with a fake data access service', 'Creating a service to insert a new person using dependency injection']}, {'end': 1562.65, 'start': 1298.869, 'title': 'Spring boot api configuration', 'summary': 'Discusses creating a person controller in spring boot, configuring dependency injection with annotations such as @repository and @service, and using @autowired and @qualifier to inject beans and distinguish between multiple implementations.', 'duration': 263.781, 'highlights': ['The chapter discusses creating a person controller in Spring Boot, configuring dependency injection with annotations such as @Repository and @Service, and using @Autowired and @Qualifier to inject beans and distinguish between multiple implementations.', 'The controller is created and a method to add a person is defined, which returns a status code of 200 upon success or throws an exception if anything fails.', 'Dependency injection is configured using annotations such as @Repository and @Service to instantiate beans and inject them into other classes.', 'The usage of @Autowired is explained for auto-wiring interfaces, and @Qualifier is used to distinguish between multiple implementations of the same interface.']}], 'duration': 1191.008, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ371642.jpg', 'highlights': ['Running Spring Boot application on Tomcat with default port 8080', 'Selecting Spring Boot starter web as a dependency', 'Importing and resolving dependencies with Maven in IntelliJ', 'Demonstrating the structure of the Spring Boot project', 'Defining properties for different environments, allowing for the configuration of demo, test, and production environments with different property values', 'Starting a Tomcat server with Spring Boot and implementing the API layer, controller layer, and service layer', 'Implementing one step at a time, testing functionality, and gradually adding other features for a systematic approach to development', 'Defining a model for a person with an ID and full name', 'Creating a DAO interface with insert and add methods', 'Implementing the interface with a fake data access service', 'Creating a service to insert a new person using dependency injection', 'Creating a person controller in Spring Boot, configuring dependency injection with annotations such as @Repository and @Service, and using @Autowired and @Qualifier to inject beans and distinguish between multiple implementations', 'Configuring dependency injection using annotations such as @Repository and @Service to instantiate beans and inject them into other classes', 'Explaining the usage of @Autowired for auto-wiring interfaces, and @Qualifier for distinguishing between multiple implementations of the same interface', 'The controller is created and a method to add a person is defined, which returns a status code of 200 upon success or throws an exception if anything fails']}, {'end': 2199.625, 'segs': [{'end': 1615.765, 'src': 'embed', 'start': 1563.411, 'weight': 0, 'content': [{'end': 1569.793, 'text': "So finally, let's go ahead and open up the actual API package and then person controller.", 'start': 1563.411, 'duration': 6.382}, {'end': 1574.395, 'text': "Let's also go ahead and simply say at and then auto wired.", 'start': 1570.173, 'duration': 4.222}, {'end': 1579.677, 'text': 'And basically Spring Boot injects the actual service into this constructor.', 'start': 1574.835, 'duration': 4.842}, {'end': 1584.083, 'text': 'And if you want to learn more about dependency injection, go ahead and check my channel.', 'start': 1580.458, 'duration': 3.625}, {'end': 1590.433, 'text': "I made a video specific on dependency injection and why it's important for you to know about it.", 'start': 1584.103, 'duration': 6.33}, {'end': 1596.268, 'text': 'So now Remember that I said that this class right here.', 'start': 1591.394, 'duration': 4.874}, {'end': 1601.252, 'text': 'So the API, if I go back to our diagram, is this one right here.', 'start': 1596.308, 'duration': 4.944}, {'end': 1604.955, 'text': 'And right here we can specify HTTP methods.', 'start': 1601.793, 'duration': 3.162}, {'end': 1608.178, 'text': 'So get post delete and put.', 'start': 1605.436, 'duration': 2.742}, {'end': 1611.001, 'text': 'So these clients right here.', 'start': 1608.979, 'duration': 2.022}, {'end': 1615.765, 'text': 'Right So they have to issue some requests to our back end.', 'start': 1611.201, 'duration': 4.564}], 'summary': 'The api controller specifies http methods for clients to issue requests to the backend.', 'duration': 52.354, 'max_score': 1563.411, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ1563411.jpg'}, {'end': 1744.226, 'src': 'embed', 'start': 1710.423, 'weight': 5, 'content': [{'end': 1713.366, 'text': "or we don't have any client.", 'start': 1710.423, 'duration': 2.943}, {'end': 1718.25, 'text': 'Right So we can use Postman as our client.', 'start': 1713.526, 'duration': 4.724}, {'end': 1721.352, 'text': 'Right So go ahead and download Postman.', 'start': 1718.71, 'duration': 2.642}, {'end': 1722.533, 'text': "It's an amazing client.", 'start': 1721.532, 'duration': 1.001}, {'end': 1728.156, 'text': 'And what we need to do is actually send a person to our server.', 'start': 1723.413, 'duration': 4.743}, {'end': 1737.643, 'text': 'So before we do that, so let me actually clear everything here and basically go ahead and say post.', 'start': 1728.877, 'duration': 8.766}, {'end': 1744.226, 'text': 'And then this will be local host column and then 80 80.', 'start': 1738.563, 'duration': 5.663}], 'summary': 'Using postman as a client to send a request to the server at localhost:8080.', 'duration': 33.803, 'max_score': 1710.423, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ1710423.jpg'}, {'end': 1805.834, 'src': 'embed', 'start': 1776.1, 'weight': 4, 'content': [{'end': 1780.123, 'text': 'So basically, we want to send James Bond to the server.', 'start': 1776.1, 'duration': 4.023}, {'end': 1784.245, 'text': 'So in order for us to do that, we have to do a few things.', 'start': 1780.923, 'duration': 3.322}, {'end': 1792.768, 'text': 'One is we have to define these properties in our pojo so that when we send this,', 'start': 1785.205, 'duration': 7.563}, {'end': 1800.892, 'text': 'Jason Spring knows to take this property and then convert that into a Java class.', 'start': 1792.768, 'duration': 8.124}, {'end': 1805.834, 'text': 'Right So in order for us to do that, what we need to do is open up person.', 'start': 1801.232, 'duration': 4.602}], 'summary': 'Send james bond to server by defining properties in pojo for json spring conversion.', 'duration': 29.734, 'max_score': 1776.1, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ1776100.jpg'}, {'end': 1999.156, 'src': 'embed', 'start': 1969.086, 'weight': 2, 'content': [{'end': 1972.809, 'text': 'And this means that the request went through fine.', 'start': 1969.086, 'duration': 3.723}, {'end': 1983.221, 'text': "Now, obviously, we don't have a way of testing this, right? Because we don't have an endpoint to retrieve people from our database.", 'start': 1974.133, 'duration': 9.088}, {'end': 1989.107, 'text': "So let's go ahead and define the functionality to get people from our database.", 'start': 1983.602, 'duration': 5.505}, {'end': 1992.55, 'text': 'So let me go ahead and open up IntelliJ.', 'start': 1989.647, 'duration': 2.903}, {'end': 1999.156, 'text': 'And if I collapse that, so go ahead and open up the person DAO.', 'start': 1993.511, 'duration': 5.645}], 'summary': 'The request went through fine, but testing is not possible. defining functionality to retrieve people from the database using intellij.', 'duration': 30.07, 'max_score': 1969.086, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ1969086.jpg'}, {'end': 2039.817, 'src': 'heatmap', 'start': 1969.086, 'weight': 0.924, 'content': [{'end': 1972.809, 'text': 'And this means that the request went through fine.', 'start': 1969.086, 'duration': 3.723}, {'end': 1983.221, 'text': "Now, obviously, we don't have a way of testing this, right? Because we don't have an endpoint to retrieve people from our database.", 'start': 1974.133, 'duration': 9.088}, {'end': 1989.107, 'text': "So let's go ahead and define the functionality to get people from our database.", 'start': 1983.602, 'duration': 5.505}, {'end': 1992.55, 'text': 'So let me go ahead and open up IntelliJ.', 'start': 1989.647, 'duration': 2.903}, {'end': 1999.156, 'text': 'And if I collapse that, so go ahead and open up the person DAO.', 'start': 1993.511, 'duration': 5.645}, {'end': 2009.624, 'text': "And let's go ahead and say that this will return a list of person and say select all people.", 'start': 2000.317, 'duration': 9.307}, {'end': 2015.75, 'text': "And then let's go ahead and open up the person data access service.", 'start': 2010.225, 'duration': 5.525}, {'end': 2018.252, 'text': 'So we need to implement that.', 'start': 2016.53, 'duration': 1.722}, {'end': 2022.175, 'text': 'And then right here, what we need to do is very simple.', 'start': 2019.693, 'duration': 2.482}, {'end': 2026.078, 'text': 'Return the actual database and open up service.', 'start': 2022.275, 'duration': 3.803}, {'end': 2039.817, 'text': 'So right here simply create a method public and then list of person, get and then all people,', 'start': 2027.62, 'duration': 12.197}], 'summary': 'Defining functionality to retrieve people from the database.', 'duration': 70.731, 'max_score': 1969.086, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ1969086.jpg'}, {'end': 2141.807, 'src': 'embed', 'start': 2111.48, 'weight': 1, 'content': [{'end': 2120.007, 'text': "So open a postman and then let's actually try and send the actual same request.", 'start': 2111.48, 'duration': 8.527}, {'end': 2122.169, 'text': "So we're going to send James Bond.", 'start': 2120.548, 'duration': 1.621}, {'end': 2124.563, 'text': 'You can see that worked.', 'start': 2123.643, 'duration': 0.92}, {'end': 2130.784, 'text': "And now let's go ahead and try and perform a get request to our server.", 'start': 2125.423, 'duration': 5.361}, {'end': 2133.465, 'text': 'So the exact same URL send.', 'start': 2130.924, 'duration': 2.541}, {'end': 2135.045, 'text': 'And there we go.', 'start': 2134.345, 'duration': 0.7}, {'end': 2140.226, 'text': 'So you can see that we have an array with one person that comes from our database.', 'start': 2135.105, 'duration': 5.121}, {'end': 2141.807, 'text': 'So this is awesome.', 'start': 2140.606, 'duration': 1.201}], 'summary': 'Sent request for james bond, successfully retrieved one entry from database.', 'duration': 30.327, 'max_score': 2111.48, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ2111480.jpg'}], 'start': 1563.411, 'title': 'Creating rest api in spring boot', 'summary': 'Covers creating a rest api in spring boot, including injecting services using dependency injection, specifying http methods, utilizing postman as a client, defining endpoints, sending json payloads, implementing get and post requests, and testing functionality, resulting in successful requests and database retrievals.', 'chapters': [{'end': 1744.226, 'start': 1563.411, 'title': 'Creating rest controller in spring boot', 'summary': 'Discusses creating a rest controller in spring boot, including injecting services using dependency injection, specifying http methods, and utilizing postman as a client to send a person to the server.', 'duration': 180.815, 'highlights': ['Spring Boot injects the actual service into the constructor using dependency injection.', 'Specifying HTTP methods for the API endpoints: GET, POST, PUT, and DELETE.', 'Utilizing Postman as a client to send a person to the server.']}, {'end': 2199.625, 'start': 1744.227, 'title': 'Creating rest api with spring boot', 'summary': 'Discusses the process of creating a rest api using spring boot, including defining endpoints, sending json payloads, implementing get and post requests, and testing functionality, resulting in successful requests and database retrievals.', 'duration': 455.398, 'highlights': ['The chapter discusses the process of creating a REST API using Spring Boot, including defining endpoints, sending JSON payloads, implementing GET and POST requests, and testing functionality, resulting in successful requests and database retrievals.', 'The tutorial emphasizes the importance of defining properties in the POJO for Spring to convert the JSON payload into a Java class, simplifying the understanding of the process.', 'The demonstration includes sending requests using Postman, which result in successful 200 status codes, indicating that the requests went through fine.', 'The implementation of functionality to retrieve people from the database is showcased, with successful testing of GET requests returning arrays of people from the database.']}], 'duration': 636.214, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ1563411.jpg', 'highlights': ['Specifying HTTP methods for the API endpoints: GET, POST, PUT, and DELETE.', 'The demonstration includes sending requests using Postman, which result in successful 200 status codes, indicating that the requests went through fine.', 'The implementation of functionality to retrieve people from the database is showcased, with successful testing of GET requests returning arrays of people from the database.', 'Spring Boot injects the actual service into the constructor using dependency injection.', 'The tutorial emphasizes the importance of defining properties in the POJO for Spring to convert the JSON payload into a Java class, simplifying the understanding of the process.', 'Utilizing Postman as a client to send a person to the server.']}, {'end': 2566.629, 'segs': [{'end': 2324.008, 'src': 'embed', 'start': 2233.373, 'weight': 0, 'content': [{'end': 2235.573, 'text': "And let's also define a couple of things.", 'start': 2233.373, 'duration': 2.2}, {'end': 2238.854, 'text': "So let's also define that we want to update a person.", 'start': 2235.853, 'duration': 3.001}, {'end': 2248.056, 'text': 'So this will return an integer and then simply say update and then person by ID.', 'start': 2239.894, 'duration': 8.162}, {'end': 2250.917, 'text': "So right here we're going to pass the actual ID.", 'start': 2248.736, 'duration': 2.181}, {'end': 2257.151, 'text': 'and the actual new person that we want to update.', 'start': 2254.389, 'duration': 2.762}, {'end': 2258.692, 'text': 'Right So person.', 'start': 2257.251, 'duration': 1.441}, {'end': 2264.055, 'text': "And also let's define one more method.", 'start': 2259.492, 'duration': 4.563}, {'end': 2267.917, 'text': 'And this will be an optional of and then person.', 'start': 2264.335, 'duration': 3.582}, {'end': 2278.857, 'text': 'And then simply say select person by and then ID and then simply pass the actual ID inside.', 'start': 2270.41, 'duration': 8.447}, {'end': 2280.118, 'text': 'And there we go.', 'start': 2279.557, 'duration': 0.561}, {'end': 2285.522, 'text': "So now let's go ahead and open up the fake person data access service.", 'start': 2280.899, 'duration': 4.623}, {'end': 2288.084, 'text': 'And we have to implement all of those methods.', 'start': 2286.123, 'duration': 1.961}, {'end': 2292.387, 'text': "So I'm pressing alt and then enter and then implement methods.", 'start': 2288.185, 'duration': 4.202}, {'end': 2296.089, 'text': 'And you can see that we have these three methods that we need to implement.', 'start': 2293.008, 'duration': 3.081}, {'end': 2299.031, 'text': 'Okay And errors gone.', 'start': 2296.81, 'duration': 2.221}, {'end': 2304.014, 'text': "So in fact, let's go ahead and implement select person by ID first.", 'start': 2299.671, 'duration': 4.343}, {'end': 2314.701, 'text': 'So to implement this method, what we need to do is actually search within our database and see whether we have a person with the given ID.', 'start': 2304.754, 'duration': 9.947}, {'end': 2315.842, 'text': 'So this one right here.', 'start': 2314.761, 'duration': 1.081}, {'end': 2320.185, 'text': 'So the way we do it is simply by streaming our database.', 'start': 2316.342, 'duration': 3.843}, {'end': 2324.008, 'text': "So let's go ahead and use Java streams dot and then stream.", 'start': 2320.285, 'duration': 3.723}], 'summary': 'Defining and implementing methods to update and select person by id using java streams.', 'duration': 90.635, 'max_score': 2233.373, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ2233373.jpg'}, {'end': 2379.463, 'src': 'embed', 'start': 2353.583, 'weight': 2, 'content': [{'end': 2360.085, 'text': "So now let's go ahead and open up the actual service and then simply implement the same method here.", 'start': 2353.583, 'duration': 6.502}, {'end': 2374.07, 'text': 'So public and then this will be an optional of and then person and then get person by ID and then simply pass the actual ID.', 'start': 2360.145, 'duration': 13.925}, {'end': 2379.463, 'text': "And you can see that it's almost the same thing that we're doing right here.", 'start': 2376.141, 'duration': 3.322}], 'summary': 'Implementing the get person by id method for a service.', 'duration': 25.88, 'max_score': 2353.583, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ2353583.jpg'}, {'end': 2444.95, 'src': 'embed', 'start': 2416.54, 'weight': 6, 'content': [{'end': 2426.245, 'text': 'And then what we want to do is simply say return and then person service dot get person by ID lowercase ID.', 'start': 2416.54, 'duration': 9.705}, {'end': 2430.56, 'text': 'and then dot or else and then no.', 'start': 2427.358, 'duration': 3.202}, {'end': 2440.267, 'text': 'So right here you could actually have a custom message or a custom exception or a custom code thrown to the actual client.', 'start': 2431.361, 'duration': 8.906}, {'end': 2444.95, 'text': 'So for example, a 404 with a message saying user not found.', 'start': 2440.767, 'duration': 4.183}], 'summary': 'The code returns a custom 404 error message when the user is not found.', 'duration': 28.41, 'max_score': 2416.54, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ2416540.jpg'}, {'end': 2504.319, 'src': 'embed', 'start': 2470.845, 'weight': 7, 'content': [{'end': 2477.968, 'text': 'Right So the way that we get the ID from the path is by simply using an annotation.', 'start': 2470.845, 'duration': 7.123}, {'end': 2480.569, 'text': 'And the annotation is called.', 'start': 2478.508, 'duration': 2.061}, {'end': 2485.332, 'text': 'So this one is at and then path and then variable.', 'start': 2480.849, 'duration': 4.483}, {'end': 2490.174, 'text': 'And the path variable that we want is an ID.', 'start': 2486.332, 'duration': 3.842}, {'end': 2492.955, 'text': 'So ID just like that.', 'start': 2490.714, 'duration': 2.241}, {'end': 2496.596, 'text': 'And basically this is the type right here.', 'start': 2493.935, 'duration': 2.661}, {'end': 2500.218, 'text': "So now let's go ahead and define the actual mapping.", 'start': 2497.617, 'duration': 2.601}, {'end': 2504.319, 'text': 'So this will be at and then get and then mapping.', 'start': 2500.358, 'duration': 3.961}], 'summary': "Using annotation 'path variable' to get id from the path in java mapping.", 'duration': 33.474, 'max_score': 2470.845, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ2470845.jpg'}, {'end': 2566.629, 'src': 'embed', 'start': 2536.199, 'weight': 8, 'content': [{'end': 2545.958, 'text': 'So if I pretty much just restart the actual server, There we go.', 'start': 2536.199, 'duration': 9.759}, {'end': 2546.679, 'text': "I've been running.", 'start': 2545.978, 'duration': 0.701}, {'end': 2553.702, 'text': 'So if I open a postman, now we need to issue some requests.', 'start': 2547.179, 'duration': 6.523}, {'end': 2559.505, 'text': 'So you can see that every time that we restart the server, we lose everything from our list.', 'start': 2553.922, 'duration': 5.583}, {'end': 2562.627, 'text': "That's a disadvantage of having an in memory database.", 'start': 2559.946, 'duration': 2.681}, {'end': 2566.629, 'text': 'But for this video, you can see exactly how everything works.', 'start': 2563.147, 'duration': 3.482}], 'summary': 'Restarting the server causes loss of in-memory database, affecting requests and list.', 'duration': 30.43, 'max_score': 2536.199, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ2536199.jpg'}], 'start': 2200.405, 'title': 'Implementing person service', 'summary': 'Covers implementing methods for updating, deleting, and selecting a person by id, including defining http methods, utilizing java streams, handling exceptions, and mapping paths and variables.', 'chapters': [{'end': 2267.917, 'start': 2200.405, 'title': 'Implementing http methods for updating and deleting persons', 'summary': 'Covers implementing the ability to update and delete a person using the http methods, including defining the methods for deleting a person by id, updating a person by id, and retrieving a person as an optional value.', 'duration': 67.512, 'highlights': ['Defining method to update a person by ID, returning an integer and passing the ID and the new person as parameters.', 'Defining method to delete a person by ID, returning an integer and requiring the ID as a parameter.', 'Defining method to retrieve a person as an optional value.']}, {'end': 2352.742, 'start': 2270.41, 'title': 'Implementing select person by id method', 'summary': 'Demonstrates implementing the select person by id method, utilizing java streams to search the database for a person with a given id and successfully implementing the required methods in the fake person data access service.', 'duration': 82.332, 'highlights': ['Implementing the select person by ID method by using Java streams to search the database for a person with a given ID.', 'Demonstrating the utilization of streams and filter method to search for a person with a specific ID.', "Successfully implementing the required methods in the fake person data access service by using the 'implement methods' feature."]}, {'end': 2566.629, 'start': 2353.583, 'title': 'Implementing person service in controller', 'summary': 'Outlines the process of implementing a person service in a controller, including defining methods, handling exceptions, and utilizing annotations for mapping paths and variables, aiming to retrieve and return person data through requests.', 'duration': 213.046, 'highlights': ['The chapter discusses implementing methods for retrieving person data by ID in a service and controller.', "Demonstrating the handling of exceptions, such as a 404 message for 'user not found'.", 'The chapter explains the usage of annotations like @PathVariable and @GetMapping for mapping paths and variables.', 'Illustrating the process of testing the implemented functionality using Postman and restarting the server.']}], 'duration': 366.224, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ2200405.jpg', 'highlights': ['Defining method to update a person by ID, returning an integer and passing the ID and the new person as parameters.', 'Defining method to delete a person by ID, returning an integer and requiring the ID as a parameter.', 'Defining method to retrieve a person as an optional value.', 'Implementing the select person by ID method by using Java streams to search the database for a person with a given ID.', 'Demonstrating the utilization of streams and filter method to search for a person with a specific ID.', 'The chapter discusses implementing methods for retrieving person data by ID in a service and controller.', "Demonstrating the handling of exceptions, such as a 404 message for 'user not found'.", 'The chapter explains the usage of annotations like @PathVariable and @GetMapping for mapping paths and variables.', 'Illustrating the process of testing the implemented functionality using Postman and restarting the server.', "Successfully implementing the required methods in the fake person data access service by using the 'implement methods' feature."]}, {'end': 3701.242, 'segs': [{'end': 2696.926, 'src': 'embed', 'start': 2635.569, 'weight': 1, 'content': [{'end': 2641.252, 'text': 'And then forward slash send that you can see that works.', 'start': 2635.569, 'duration': 5.683}, {'end': 2649.377, 'text': 'Right And in fact, let me go ahead and say UID generator and let me generate a UID.', 'start': 2642.093, 'duration': 7.284}, {'end': 2651.898, 'text': 'So I want one UID here.', 'start': 2649.617, 'duration': 2.281}, {'end': 2662.264, 'text': 'And if I grab this and then go back to postman and then perform a get request with that UID there.', 'start': 2652.959, 'duration': 9.305}, {'end': 2670.459, 'text': 'So if I delete everything, and then paste that UID and then send.', 'start': 2662.965, 'duration': 7.494}, {'end': 2678.856, 'text': "you see that it's a 200, but we have nothing in our database with that UID.", 'start': 2671.792, 'duration': 7.064}, {'end': 2685.86, 'text': 'Right So as I said, so you should be throwing a 404 with a custom exception.', 'start': 2679.356, 'duration': 6.504}, {'end': 2693.424, 'text': 'But in this video you can see exactly that we are returning nothing because there is no one with that UID against our database.', 'start': 2686.44, 'duration': 6.984}, {'end': 2696.926, 'text': "So let's go ahead and implement the remaining methods.", 'start': 2694.084, 'duration': 2.842}], 'summary': 'Testing uid generation and api response with postman, aiming for 404 error handling', 'duration': 61.357, 'max_score': 2635.569, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ2635569.jpg'}, {'end': 3040.334, 'src': 'embed', 'start': 2985.704, 'weight': 0, 'content': [{'end': 2990.906, 'text': 'Right And then what we need to do is simply say return person.', 'start': 2985.704, 'duration': 5.202}, {'end': 2994.408, 'text': 'And then update and then ID.', 'start': 2991.286, 'duration': 3.122}, {'end': 3000.171, 'text': "Right So you can see that I don't have much logic going on here.", 'start': 2994.848, 'duration': 5.323}, {'end': 3007.556, 'text': "And this is because I'm just teaching you exactly how to use Spring Boot to create an API.", 'start': 3000.672, 'duration': 6.884}, {'end': 3015.4, 'text': 'But essentially, inside of this service, you have whatever logic your application requires.', 'start': 3007.956, 'duration': 7.444}, {'end': 3019.022, 'text': "Right So I'm just making it simple for you to understand exactly.", 'start': 3015.821, 'duration': 3.201}, {'end': 3021.264, 'text': "So you don't have a lot of code going on.", 'start': 3019.503, 'duration': 1.761}, {'end': 3025.626, 'text': 'Basically, you see the entire process of what we are doing.', 'start': 3021.784, 'duration': 3.842}, {'end': 3034.311, 'text': 'So now let me go back to the actual person controller and simply expose those to a rest API.', 'start': 3026.286, 'duration': 8.025}, {'end': 3039.134, 'text': 'So the first one is update or actually delete.', 'start': 3034.791, 'duration': 4.343}, {'end': 3040.334, 'text': "So let's go ahead and say delete.", 'start': 3039.154, 'duration': 1.18}], 'summary': 'Teaching how to create a simple spring boot api, focusing on ease of understanding and minimal code.', 'duration': 54.63, 'max_score': 2985.704, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ2985704.jpg'}, {'end': 3613.833, 'src': 'heatmap', 'start': 3543.051, 'weight': 0.709, 'content': [{'end': 3550.374, 'text': 'So one last thing that I want to mention is that you see inside of this person controller right here.', 'start': 3543.051, 'duration': 7.323}, {'end': 3561.099, 'text': 'So this person controller, we can have some annotations that enforce nullability in our application.', 'start': 3551.574, 'duration': 9.525}, {'end': 3572.245, 'text': 'So we can pretty much just use some annotations and enforce that this object right here is always present and also valid.', 'start': 3561.68, 'duration': 10.565}, {'end': 3576.468, 'text': 'So go ahead and open up person model.', 'start': 3572.846, 'duration': 3.622}, {'end': 3582.651, 'text': 'And then right here, what we can do is actually say that this field right here.', 'start': 3577.348, 'duration': 5.303}, {'end': 3586.293, 'text': 'So the actual name, this cannot be blank.', 'start': 3582.811, 'duration': 3.482}, {'end': 3590.255, 'text': 'So at and then not and then blank.', 'start': 3586.433, 'duration': 3.822}, {'end': 3596.238, 'text': "Right So the reason why I'm not saying not no is because if you have an empty string, it's not no.", 'start': 3590.695, 'duration': 5.543}, {'end': 3600.14, 'text': "But if you have an empty string, it's actually blank.", 'start': 3596.618, 'duration': 3.522}, {'end': 3602.522, 'text': "So basically we don't want that to be blank.", 'start': 3600.18, 'duration': 2.342}, {'end': 3606.285, 'text': 'Right So then go back to the actual controller.', 'start': 3602.762, 'duration': 3.523}, {'end': 3609.148, 'text': 'And now you can say that the request body.', 'start': 3606.846, 'duration': 2.302}, {'end': 3613.833, 'text': 'So this has to be so at and then valid.', 'start': 3609.648, 'duration': 4.185}], 'summary': 'Using annotations to enforce nullability in the person controller and model.', 'duration': 70.782, 'max_score': 3543.051, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ3543051.jpg'}, {'end': 3701.242, 'src': 'embed', 'start': 3670.295, 'weight': 3, 'content': [{'end': 3675.077, 'text': "And it's pretty much saying that validation failed for object person right here.", 'start': 3670.295, 'duration': 4.782}, {'end': 3676.998, 'text': 'So this is awesome.', 'start': 3675.417, 'duration': 1.581}, {'end': 3684.261, 'text': 'And you can see the actual default message, which says that the field name must not be blank.', 'start': 3677.338, 'duration': 6.923}, {'end': 3688.722, 'text': 'So now if I go ahead and add the correct payload.', 'start': 3685.041, 'duration': 3.681}, {'end': 3690.303, 'text': 'So right here.', 'start': 3689.343, 'duration': 0.96}, {'end': 3694.905, 'text': "So let's go ahead and say John and then Jones.", 'start': 3691.043, 'duration': 3.862}, {'end': 3701.242, 'text': 'and then send, you can see that we have a 200 status code.', 'start': 3697.58, 'duration': 3.662}], 'summary': 'Validation failed for object person. field name must not be blank. successful payload entry. 200 status code received.', 'duration': 30.947, 'max_score': 3670.295, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ3670295.jpg'}], 'start': 2567.169, 'title': 'Implementing rest api with spring boot', 'summary': 'Demonstrates sending post requests for adding and retrieving objects, handling bad requests and non-existent uids, and the importance of proper error handling. it also discusses implementing delete and update functions for a person data access service and implementing rest api methods like create, update, and delete using spring boot, resulting in successful implementation and use of nullability and valid object enforcement.', 'chapters': [{'end': 2696.926, 'start': 2567.169, 'title': 'Implementing api requests and error handling', 'summary': 'Demonstrates sending post requests to add and retrieve objects, handling bad requests and non-existent uids, and the importance of proper error handling, including custom exceptions.', 'duration': 129.757, 'highlights': ['The chapter demonstrates sending post requests to add and retrieve objects, including examples of successful requests and handling of bad requests with invalid UIDs.', 'It highlights the importance of proper error handling by mentioning the need for a 404 custom exception when data is not found in the database.', 'The speaker also mentions the need to implement remaining methods, suggesting further content on API implementation and error handling.']}, {'end': 2922.877, 'start': 2697.326, 'title': 'Implementing delete and update functions', 'summary': 'Discusses implementing the delete and update functions for a person data access service, including checking for person existence, removing from the database, and mapping and updating the person, providing an overview of the implementation process.', 'duration': 225.551, 'highlights': ['To delete a person, the process involves checking the presence of the person and then removing it from the database, returning zero if not found and one if successfully deleted.', 'Updating a person involves mapping, checking the index of the person, and setting the contents to the new person received, returning one if the person is found and updated, otherwise returning zero.', 'The process provides a clear overview of implementing the delete and update functions, ensuring proper handling of person data in the database.']}, {'end': 3701.242, 'start': 2923.457, 'title': 'Implementing rest api with spring boot', 'summary': 'Covers implementing rest api methods like create, update, and delete using spring boot, with testing and validation, resulting in successful implementation and use of nullability and valid object enforcement.', 'duration': 777.785, 'highlights': ['The chapter covers implementing REST API methods like create, update, and delete using Spring Boot', 'Testing and validation resulted in successful implementation', 'Enforcement of nullability and valid object in the application']}], 'duration': 1134.073, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ2567169.jpg', 'highlights': ['The chapter covers implementing REST API methods like create, update, and delete using Spring Boot', 'Demonstrates sending post requests to add and retrieve objects, including examples of successful requests and handling of bad requests with invalid UIDs', 'The process provides a clear overview of implementing the delete and update functions, ensuring proper handling of person data in the database', 'Testing and validation resulted in successful implementation', 'It highlights the importance of proper error handling by mentioning the need for a 404 custom exception when data is not found in the database']}, {'end': 4348.686, 'segs': [{'end': 3763.548, 'src': 'embed', 'start': 3732.021, 'weight': 4, 'content': [{'end': 3741.606, 'text': "Right So let's say that we want to have a Postgres implementation, right? Another database or connecting to a different database.", 'start': 3732.021, 'duration': 9.585}, {'end': 3747.57, 'text': 'So how do we change that without changing pretty much anything apart from one line of code?', 'start': 3741.987, 'duration': 5.583}, {'end': 3756.84, 'text': 'So to do that, what we need to do is open up the actual DAO package and then simply create a new class.', 'start': 3748.09, 'duration': 8.75}, {'end': 3763.548, 'text': 'And right here, simply call it, for example, person.', 'start': 3757.08, 'duration': 6.468}], 'summary': 'One line change to implement postgres database in dao package', 'duration': 31.527, 'max_score': 3732.021, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ3732021.jpg'}, {'end': 3872.898, 'src': 'embed', 'start': 3841.286, 'weight': 0, 'content': [{'end': 3841.747, 'text': 'like that.', 'start': 3841.286, 'duration': 0.461}, {'end': 3849.635, 'text': 'Now if I restart the actual server and then open a postman.', 'start': 3842.427, 'duration': 7.208}, {'end': 3861.273, 'text': 'Now if I perform a get you can see that we pretty much switched our database with just one line of code.', 'start': 3852.738, 'duration': 8.535}, {'end': 3865.695, 'text': 'And you can see that this now is coming from a Postgres database.', 'start': 3861.693, 'duration': 4.002}, {'end': 3872.898, 'text': "So I'm actually planning to do a video on connecting to a real Postgres database.", 'start': 3866.396, 'duration': 6.502}], 'summary': 'Switched database with one line of code, now using postgres, planning video on connecting to it.', 'duration': 31.612, 'max_score': 3841.286, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ3841286.jpg'}, {'end': 3931.45, 'src': 'embed', 'start': 3899.501, 'weight': 1, 'content': [{'end': 3904.045, 'text': 'Now what I want to show you is actually how to spin up the actual jar.', 'start': 3899.501, 'duration': 4.544}, {'end': 3910.87, 'text': 'So this is the jar that you can deploy to a server and have your application up and running.', 'start': 3904.185, 'duration': 6.685}, {'end': 3916.735, 'text': "So I'm going to simply collapse that and then inside of Maven.", 'start': 3911.431, 'duration': 5.304}, {'end': 3919.377, 'text': 'So go ahead and open up this tab right here.', 'start': 3917.115, 'duration': 2.262}, {'end': 3919.958, 'text': 'So Maven.', 'start': 3919.397, 'duration': 0.561}, {'end': 3922.801, 'text': 'And you should see a target folder.', 'start': 3920.858, 'duration': 1.943}, {'end': 3931.45, 'text': "So if you don't see that, so if I delete that, simply go ahead and open up lifecycle and then simply say install.", 'start': 3923.261, 'duration': 8.189}], 'summary': 'Demonstrating how to deploy a jar using maven, including installing through the lifecycle', 'duration': 31.949, 'max_score': 3899.501, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ3899501.jpg'}, {'end': 4071.491, 'src': 'embed', 'start': 4044.555, 'weight': 2, 'content': [{'end': 4049.902, 'text': 'And basically you can distribute this and have thousands of clients consume your API.', 'start': 4044.555, 'duration': 5.347}, {'end': 4058.145, 'text': 'So I hope you had fun implementing this application or this API with Spring Boot.', 'start': 4050.723, 'duration': 7.422}, {'end': 4060.586, 'text': 'And basically we achieved everything.', 'start': 4058.546, 'duration': 2.04}, {'end': 4063.287, 'text': 'So we have a client.', 'start': 4060.806, 'duration': 2.481}, {'end': 4064.708, 'text': 'So in our case was Postman.', 'start': 4063.307, 'duration': 1.401}, {'end': 4068.549, 'text': 'We implemented get post, delete and pull requests.', 'start': 4065.168, 'duration': 3.381}, {'end': 4071.491, 'text': 'through the actual control layer.', 'start': 4069.609, 'duration': 1.882}], 'summary': 'Implementing api with spring boot, achieving everything, serving thousands of clients.', 'duration': 26.936, 'max_score': 4044.555, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ4044555.jpg'}, {'end': 4130.848, 'src': 'embed', 'start': 4096.706, 'weight': 3, 'content': [{'end': 4104.05, 'text': 'I really want to add value by connecting to a real Postgres instance, which to be honest, is not going to be a lot of work.', 'start': 4096.706, 'duration': 7.344}, {'end': 4111.533, 'text': "As you saw, it's just switching one line of code and then implementing the actual connectivity to Postgres.", 'start': 4104.17, 'duration': 7.363}, {'end': 4130.848, 'text': "So now let's actually go ahead and pretty much just use or actually connect to a real database.", 'start': 4121.198, 'duration': 9.65}], 'summary': 'Connecting to a real postgres instance requires minimal effort, just a one-line code change and actual connectivity implementation.', 'duration': 34.142, 'max_score': 4096.706, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ4096706.jpg'}], 'start': 3701.943, 'title': 'Spring boot and api implementation', 'summary': 'Covers spring boot, writing apis, dependency injection, and implementing apis with spring boot, including connecting to a real postgres database using docker and providing resources for further learning.', 'chapters': [{'end': 4044.054, 'start': 3701.943, 'title': 'Spring boot: apis and dependency injection', 'summary': 'Covers spring boot, writing apis, and dependency injection, with a highlight on switching database implementation with just one line of code and spinning up the jar to deploy the application.', 'duration': 342.111, 'highlights': ['Switching database implementation with just one line of code, demonstrating the flexibility of Spring Boot.', 'Demonstrating how to spin up the jar for deployment, providing a practical guide for deploying the application.', 'Explaining the process of connecting to a real Postgres database, hinting at future content for viewers to anticipate.', 'Illustrating the usage of client API and the flexibility it offers for different applications.', 'Emphasizing the simplicity of changing database implementation with minimal code changes, showcasing the power of dependency injection.']}, {'end': 4348.686, 'start': 4044.555, 'title': 'Implementing api with spring boot', 'summary': 'Discusses implementing an api with spring boot, covering the implementation of get, post, delete, and pull requests, connecting to a real postgres database using docker, and providing resources for further learning about postgres and docker.', 'duration': 304.131, 'highlights': ['The chapter covers implementing an API with Spring Boot, achieving client functionality, and implementing get, post, delete, and pull requests through the control layer.', 'It also discusses connecting to a real Postgres database using Docker, demonstrating how easy it is to switch from databases and connect to a real database.', 'The speaker emphasizes the value of Postgres as the best database out there and provides a free Postgres QL crash course for further learning.', 'Detailed steps for using Docker to start a Postgres instance and the command breakdown for the Docker run command are provided, along with explanations for each parameter.']}], 'duration': 646.743, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ3701943.jpg', 'highlights': ["Switching database implementation with just one line of code, showcasing Spring Boot's flexibility", 'Demonstrating how to spin up the jar for deployment, providing a practical guide', 'Covering implementing an API with Spring Boot, achieving client functionality', 'Explaining the process of connecting to a real Postgres database, hinting at future content', 'Emphasizing the simplicity of changing database implementation with minimal code changes']}, {'end': 5492.971, 'segs': [{'end': 4383.062, 'src': 'embed', 'start': 4349.167, 'weight': 4, 'content': [{'end': 4358.772, 'text': 'So now if I go ahead and simply say Docker and then PS, You can see that we have this container right here and the name is Postgres Spring.', 'start': 4349.167, 'duration': 9.605}, {'end': 4366.754, 'text': 'So go ahead and simply say Docker and then port, and then post, and then grass,', 'start': 4359.412, 'duration': 7.342}, {'end': 4378.1, 'text': 'spring and And you can see that we are exposing the container port to the outside world on local host and then 5432..', 'start': 4366.754, 'duration': 11.346}, {'end': 4383.062, 'text': 'And by the way, 5432, this is a default port for Postgres.', 'start': 4378.1, 'duration': 4.962}], 'summary': 'Using docker to expose postgres container on port 5432.', 'duration': 33.895, 'max_score': 4349.167, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ4349167.jpg'}, {'end': 4526.034, 'src': 'embed', 'start': 4493.016, 'weight': 2, 'content': [{'end': 4501.684, 'text': 'But before we do that, what we need to do is actually add some dependencies that will allow us to connect to databases,', 'start': 4493.016, 'duration': 8.668}, {'end': 4509.792, 'text': 'have the drivers and then also give us the ability to write SQL commands against our database.', 'start': 4501.684, 'duration': 8.108}, {'end': 4514.316, 'text': 'So for that, what we need to do is open up Palm XML.', 'start': 4510.332, 'duration': 3.984}, {'end': 4517.399, 'text': 'And just let me collapse this for a second.', 'start': 4515.857, 'duration': 1.542}, {'end': 4524.133, 'text': 'And you can see some information about this project.', 'start': 4521.591, 'duration': 2.542}, {'end': 4526.034, 'text': "I'm using Java 11.", 'start': 4524.153, 'duration': 1.881}], 'summary': 'Configuring dependencies to connect to databases in java 11.', 'duration': 33.018, 'max_score': 4493.016, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ4493016.jpg'}, {'end': 4868.386, 'src': 'embed', 'start': 4839.695, 'weight': 0, 'content': [{'end': 4845.178, 'text': 'So basically we are instantiating this Ikari data source as a bean.', 'start': 4839.695, 'duration': 5.483}, {'end': 4853.141, 'text': "And then what we're going to do is create some configuration file that will contain the username, URL, password, so on and so forth.", 'start': 4846.038, 'duration': 7.103}, {'end': 4857.542, 'text': "So let's go ahead and simply open up the application properties.", 'start': 4853.821, 'duration': 3.721}, {'end': 4863.225, 'text': 'And inside of application properties, what we need to do is simply do the following.', 'start': 4858.543, 'duration': 4.682}, {'end': 4868.386, 'text': "So let's go ahead and have an app property.", 'start': 4864.165, 'duration': 4.221}], 'summary': 'Instantiating ikari data source as a bean and configuring application properties.', 'duration': 28.691, 'max_score': 4839.695, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ4839695.jpg'}, {'end': 5028.745, 'src': 'embed', 'start': 4992.716, 'weight': 1, 'content': [{'end': 5001.469, 'text': 'So now it says that cannot find migrations in location class path DB and then migration.', 'start': 4992.716, 'duration': 8.753}, {'end': 5013.878, 'text': 'So what we need to do is to create a folder called DB and then another one called migrations and then have our database migrations inside it.', 'start': 5002.189, 'duration': 11.689}, {'end': 5023.883, 'text': 'And this is basically Flyway, right? So Flyway allows us to manage our database schema as we evolve.', 'start': 5015.299, 'duration': 8.584}, {'end': 5028.745, 'text': 'So go ahead and pretty much just learn about Flyway right here.', 'start': 5024.403, 'duration': 4.342}], 'summary': "Create 'db' and 'migrations' folders to manage database schema using flyway.", 'duration': 36.029, 'max_score': 4992.716, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ4992716.jpg'}, {'end': 5254.142, 'src': 'embed', 'start': 5225.973, 'weight': 3, 'content': [{'end': 5230.615, 'text': "And this is where I've got type some Docker commands.", 'start': 5225.973, 'duration': 4.642}, {'end': 5238.337, 'text': 'And you saw that how we pretty much just launched this container, which is running and also exposing this port.', 'start': 5230.775, 'duration': 7.562}, {'end': 5239.197, 'text': 'So 5432.', 'start': 5238.377, 'duration': 0.82}, {'end': 5241.438, 'text': 'So this is the port that we are connecting.', 'start': 5239.197, 'duration': 2.241}, {'end': 5245.639, 'text': 'Right So local host 5432.', 'start': 5242.358, 'duration': 3.281}, {'end': 5251.301, 'text': "So let's actually go ahead and bash into this container and create a database.", 'start': 5245.639, 'duration': 5.662}, {'end': 5254.142, 'text': 'So simply go ahead and say Docker.', 'start': 5251.901, 'duration': 2.241}], 'summary': 'Demonstrated launching a container, exposing port 5432, and creating a database.', 'duration': 28.169, 'max_score': 5225.973, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ5225973.jpg'}], 'start': 4349.167, 'title': 'Database connection and configuration', 'summary': 'Covers using docker and intellij to manage a postgres database, setting up data source and defining jdbc url, username, and password, and demonstrates setting up flyway for managing schema and database migrations with focus on postgres and docker. it includes configuring application properties, adding dependencies in palm xml, and utilizing terminal commands and postgres functionality. the defined pool size for connections is 30.', 'chapters': [{'end': 4678.785, 'start': 4349.167, 'title': 'Using docker and intellij for database connection', 'summary': 'Covers how to use docker and intellij to connect and manage a postgres database, including exposing the container port, setting up connection details in application properties, adding dependencies in palm xml, and explaining the purpose of each dependency.', 'duration': 329.618, 'highlights': ['Explaining the purpose of dependencies in Palm XML', 'Adding dependencies in Palm XML for database connection', 'Exposing the container port and default port for Postgres', 'Setting up connection details in application properties', 'Writing tests and creating application properties']}, {'end': 4961.558, 'start': 4679.525, 'title': 'Configuring data source for project', 'summary': 'Covers setting up a data source by creating a new package and class, configuring application properties, and defining jdbc url, username, and password for connecting to a database, with a defined pool size of 30 connections.', 'duration': 282.033, 'highlights': ["Creating a new package and class named 'data source' to serve as a configuration for returning a data source, allowing connection to the database.", "Defining JDBC URL, username, and password inside the application properties file, with the default username 'Postgres', the password 'password', and a pool size of 30 connections."]}, {'end': 5492.971, 'start': 4962.359, 'title': 'Setting up flyway for database migrations', 'summary': 'Demonstrates setting up flyway for managing database schema, creating a database, and connecting to it using postgres and docker, including creating a migration folder, a sql migration file, and creating a new database, with a focus on utilizing terminal commands and postgres functionality.', 'duration': 530.612, 'highlights': ['Demonstrating setting up Flyway for managing database schema', 'Creating a new database using Docker', 'Utilizing Postgres commands in the terminal to connect and create a database']}], 'duration': 1143.804, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ4349167.jpg', 'highlights': ['Defining JDBC URL, username, and password in application properties', 'Setting up Flyway for managing database schema', 'Adding dependencies in Palm XML for database connection', 'Creating a new database using Docker', 'Exposing container port and default port for Postgres']}, {'end': 6567.912, 'segs': [{'end': 5615.501, 'src': 'embed', 'start': 5497.754, 'weight': 0, 'content': [{'end': 5503.739, 'text': 'And we have an error and it says cannot find migrations in class path DB migration.', 'start': 5497.754, 'duration': 5.985}, {'end': 5508.383, 'text': "And that's because I've misspelled migration.", 'start': 5504.28, 'duration': 4.103}, {'end': 5512.026, 'text': "I've typed migrations instead of migration.", 'start': 5508.403, 'duration': 3.623}, {'end': 5513.808, 'text': 'So just let me rename that.', 'start': 5512.547, 'duration': 1.261}, {'end': 5516.93, 'text': 'So migration and then refactor.', 'start': 5513.968, 'duration': 2.962}, {'end': 5518.131, 'text': 'There we go.', 'start': 5517.531, 'duration': 0.6}, {'end': 5520.133, 'text': 'And then start the application.', 'start': 5518.912, 'duration': 1.221}, {'end': 5524.046, 'text': 'And there we go.', 'start': 5523.505, 'duration': 0.541}, {'end': 5526.529, 'text': 'So you can see that everything started fine.', 'start': 5524.106, 'duration': 2.423}, {'end': 5534.518, 'text': 'And basically right here you can see that we have Ikari pool started and then completed.', 'start': 5527.35, 'duration': 7.168}, {'end': 5538.723, 'text': 'And then we have a demo database right here.', 'start': 5534.538, 'duration': 4.185}, {'end': 5544.916, 'text': 'And you can see that we have migrating schema.', 'start': 5541.233, 'duration': 3.683}, {'end': 5546.177, 'text': 'So person table.', 'start': 5545.076, 'duration': 1.101}, {'end': 5548.258, 'text': 'So basically that was executed.', 'start': 5546.217, 'duration': 2.041}, {'end': 5550.68, 'text': 'So our command was executed correctly.', 'start': 5548.398, 'duration': 2.282}, {'end': 5554.463, 'text': 'And you can see that the migration was applied.', 'start': 5551.741, 'duration': 2.722}, {'end': 5560.428, 'text': 'And now we have the server running on port 80 80, which is awesome.', 'start': 5554.963, 'duration': 5.465}, {'end': 5565.872, 'text': 'So now if I pretty much go back to my terminal.', 'start': 5561.168, 'duration': 4.704}, {'end': 5567.994, 'text': 'So I just want to show you something first.', 'start': 5566.473, 'duration': 1.521}, {'end': 5573.117, 'text': 'So remember, previously we type backslash D and backslash D T.', 'start': 5568.614, 'duration': 4.503}, {'end': 5574.298, 'text': "And that wasn't working.", 'start': 5573.117, 'duration': 1.181}, {'end': 5577.66, 'text': "Well, actually it was working, but we didn't have any relations.", 'start': 5574.778, 'duration': 2.882}, {'end': 5586.866, 'text': 'So if I type the same command, so backslash D T, You can see that now we have two tables.', 'start': 5578.28, 'duration': 8.586}, {'end': 5592.051, 'text': "So this one is for Flyway specific, which you shouldn't care at this point.", 'start': 5587.527, 'duration': 4.524}, {'end': 5596.976, 'text': 'But you can see that we have this table right here called person.', 'start': 5592.572, 'duration': 4.404}, {'end': 5600.24, 'text': 'And if I go ahead and describe person.', 'start': 5597.877, 'duration': 2.363}, {'end': 5602.322, 'text': 'So backslash D and then person.', 'start': 5600.3, 'duration': 2.022}, {'end': 5609.878, 'text': 'you can see that we have this table called person inside of the public schema.', 'start': 5604.454, 'duration': 5.424}, {'end': 5613.76, 'text': 'And then the ID is of type UID, not null.', 'start': 5610.438, 'duration': 3.322}, {'end': 5615.501, 'text': 'And then we also have name.', 'start': 5613.96, 'duration': 1.541}], 'summary': 'Corrected migration error, applied migration successfully, and verified database tables.', 'duration': 117.747, 'max_score': 5497.754, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ5497754.jpg'}, {'end': 5724.386, 'src': 'embed', 'start': 5688.609, 'weight': 2, 'content': [{'end': 5690.93, 'text': 'And that would semi column enter.', 'start': 5688.609, 'duration': 2.321}, {'end': 5692.27, 'text': 'You can see that worked.', 'start': 5691.37, 'duration': 0.9}, {'end': 5698.992, 'text': 'Now if I pretty much select UID generate version four and you can see that now we can generate UID.', 'start': 5692.89, 'duration': 6.102}, {'end': 5714.163, 'text': 'So if I go ahead and simply say insert into and then person And then we have ID and then name and then values.', 'start': 5699.652, 'duration': 14.511}, {'end': 5718.384, 'text': 'And then we want to generate a UID.', 'start': 5716.003, 'duration': 2.381}, {'end': 5724.386, 'text': 'So generate and then V4 and then the actual name.', 'start': 5718.684, 'duration': 5.702}], 'summary': 'The process successfully generates a uid using version four and inserts it into the person table.', 'duration': 35.777, 'max_score': 5688.609, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ5688609.jpg'}, {'end': 5790.961, 'src': 'embed', 'start': 5760.999, 'weight': 5, 'content': [{'end': 5770.446, 'text': 'Now if I select start from person, You can see that now we have two people inside of our database, and this is awesome.', 'start': 5760.999, 'duration': 9.447}, {'end': 5781.874, 'text': "So we've managed to connect to our database using Spring Boot, and we have a database up and running with a table.", 'start': 5771.006, 'duration': 10.868}, {'end': 5790.961, 'text': 'And now what we need to do really is just write some code to retrieve data from our database using Spring Boot.', 'start': 5782.575, 'duration': 8.386}], 'summary': 'Connected to database with 2 people, ready to retrieve data using spring boot.', 'duration': 29.962, 'max_score': 5760.999, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ5760999.jpg'}, {'end': 5907.806, 'src': 'embed', 'start': 5847.755, 'weight': 7, 'content': [{'end': 5853.4, 'text': "So basically this fake list, what we're going to do is use JDBC template API.", 'start': 5847.755, 'duration': 5.645}, {'end': 5857.744, 'text': 'So simply go ahead and say JDBC template dot.', 'start': 5853.54, 'duration': 4.204}, {'end': 5861.067, 'text': 'And you can see that they have various methods.', 'start': 5858.024, 'duration': 3.043}, {'end': 5863.789, 'text': 'So the one that we want is query.', 'start': 5861.607, 'duration': 2.182}, {'end': 5865.491, 'text': 'So we want to query.', 'start': 5864.43, 'duration': 1.061}, {'end': 5869.702, 'text': 'And the query takes two things.', 'start': 5867.501, 'duration': 2.201}, {'end': 5877.427, 'text': 'So we can pass an SQL statement and then we have to pass a row mapper.', 'start': 5869.943, 'duration': 7.484}, {'end': 5888.253, 'text': 'So basically the row mapper is how we take the values that we retrieve from our database and then transform that into a Java object.', 'start': 5878.147, 'duration': 10.106}, {'end': 5893.936, 'text': 'So let me go ahead and simply define a string.', 'start': 5888.913, 'duration': 5.023}, {'end': 5898.839, 'text': "So string And let's go ahead and make this final not needed.", 'start': 5894.156, 'duration': 4.683}, {'end': 5903.743, 'text': 'But why not? So SQL equals to select.', 'start': 5898.919, 'duration': 4.824}, {'end': 5905.824, 'text': 'So basically the same thing that we had.', 'start': 5904.123, 'duration': 1.701}, {'end': 5907.806, 'text': 'So select name.', 'start': 5905.924, 'duration': 1.882}], 'summary': 'Using jdbc template api to execute a query with an sql statement and a row mapper to transform retrieved values into a java object.', 'duration': 60.051, 'max_score': 5847.755, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ5847755.jpg'}], 'start': 5497.754, 'title': 'Database operations with spring boot and postgres', 'summary': "Covers database migration, table creation, and data insertion resulting in the successful creation of the 'person' table with unique ids. it also focuses on retrieving data using spring boot jdbc template and implementing spring boot to connect to a postgres database.", 'chapters': [{'end': 5760.098, 'start': 5497.754, 'title': 'Database migration and table creation', 'summary': "Demonstrates the process of correcting a migration error, executing a database migration, creating tables, and inserting data into the database, resulting in the successful creation of the 'person' table with specified fields and the ability to generate and insert unique ids.", 'duration': 262.344, 'highlights': ["The migration error was corrected by renaming the misspelled 'migrations' to 'migration', leading to the successful start of the application.", "The migration of the schema for the 'person' table was executed correctly, resulting in the successful application of the migration and the server running on port 8080.", "The demonstration of checking for the existence of tables using the command 'backslash D T' revealed the presence of two tables, including the 'person' table.", "The creation of the 'person' table with specific fields, including 'ID' and 'name', was successfully executed, with the specified field attributes and constraints.", "The ability to generate unique IDs using the 'generate V4' function for the 'UID' and successfully insert data into the 'person' table was demonstrated."]}, {'end': 6039.089, 'start': 5760.999, 'title': 'Retrieving data using spring boot jdbc template', 'summary': 'Demonstrates how to use spring boot and jdbc template to connect to a database, retrieve all entries from a table, and transform the retrieved values into java objects.', 'duration': 278.09, 'highlights': ['The chapter demonstrates how to connect to a database using Spring Boot and JDBC template.', 'The tutorial shows how to retrieve all entries from a table using JDBC template API.', 'The chapter explains the process of transforming retrieved database values into Java objects.']}, {'end': 6567.912, 'start': 6039.85, 'title': 'Implementing spring boot with postgres', 'summary': 'Demonstrates implementing spring boot to connect to a postgres database, showcasing the power and ease of use of spring boot, with a focus on connecting to databases and deploying applications.', 'duration': 528.062, 'highlights': ['The chapter demonstrates implementing Spring Boot to connect to a Postgres database', 'The demonstration emphasizes the power and ease of use of Spring Boot', 'The chapter highlights the process of connecting to databases and deploying applications']}], 'duration': 1070.158, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/vtPkZShrvXQ/pics/vtPkZShrvXQ5497754.jpg', 'highlights': ["The creation of the 'person' table with specific fields, including 'ID' and 'name', was successfully executed, with the specified field attributes and constraints.", "The migration of the schema for the 'person' table was executed correctly, resulting in the successful application of the migration and the server running on port 8080.", "The ability to generate unique IDs using the 'generate V4' function for the 'UID' and successfully insert data into the 'person' table was demonstrated.", "The demonstration of checking for the existence of tables using the command 'backslash D T' revealed the presence of two tables, including the 'person' table.", "The migration error was corrected by renaming the misspelled 'migrations' to 'migration', leading to the successful start of the application.", 'The chapter demonstrates implementing Spring Boot to connect to a Postgres database', 'The chapter demonstrates how to connect to a database using Spring Boot and JDBC template.', 'The tutorial shows how to retrieve all entries from a table using JDBC template API.', 'The chapter explains the process of transforming retrieved database values into Java objects.']}], 'highlights': ['Spring Boot is adopted by Netflix for their entire backend, showcasing its solid framework and efficiency.', "The website 'start.spring.io' allows users to bootstrap their application by selecting dependencies and configuring the project, providing flexibility in setting up the project and enabling ease in starting to code.", 'Spring Boot provides connectivity to databases, Jetty servers, metrics, and configuration, enabling quick setup without low-level code configuration.', 'The chapter covers implementing REST API methods like create, update, and delete using Spring Boot.', 'The chapter covers implementing an API with Spring Boot, achieving client functionality.', 'The chapter demonstrates implementing Spring Boot to connect to a Postgres database.', 'The chapter provides guidance on selecting the appropriate Java version, recommending Java 11 for those with the latest version installed and Java 8 for those without, ensuring compatibility and functionality for different user scenarios.', 'The tutorial emphasizes the importance of using the latest version of Spring Boot, specifically version 2.0 and above, to ensure compatibility with the latest projects and features, encouraging users to stay updated with the framework versions for optimal utilization.', 'The chapter covers implementing dependency injection and in-memory database usage, as well as connecting to a real database running on Docker.', 'The chapter demonstrates how to connect to a database using Spring Boot and JDBC template.']}