title
Spring Boot | JPA | MVC | H2 Example

description
Spring Full Course : https://courses.telusko.com/learn/Spring5 Spring Full Course (UDEMY) : https://www.udemy.com/spring-5-with-spring-boot-2/?couponCode=TELUSKOJULY Angular Full Course : https://courses.telusko.com/learn/Angular Spring Boot | JPA | MVC | H2 Example:- https://github.com/navinreddy20/Spring-Boot/tree/master/bootjpa Editing Monitors : https://amzn.to/2RfKWgL https://amzn.to/2Q665JW https://amzn.to/2OUP21a. Check out our website: http://www.telusko.com Follow Telusko on Twitter: https://twitter.com/navinreddy20 Follow on Facebook: Telusko : https://www.facebook.com/teluskolearn... Navin Reddy : https://www.facebook.com/navintelusko Follow Navin Reddy on Instagram: https://www.instagram.com/navinreddy20 Subscribe to our other channel: Navin Reddy : https://www.youtube.com/channel/UCxmk... Telusko Hindi : https://www.youtube.com/channel/UCitz... Donation: PayPal Id : navinreddy20 Patreon : navinreddy20 http://www.telusko.com/contactus

detail
{'title': 'Spring Boot | JPA | MVC | H2 Example', 'heatmap': [{'end': 145.997, 'start': 127.607, 'weight': 0.775}, {'end': 275.522, 'start': 262.135, 'weight': 0.733}, {'end': 445.41, 'start': 388.277, 'weight': 0.841}, {'end': 503.097, 'start': 481.173, 'weight': 0.769}, {'end': 538.07, 'start': 517.51, 'weight': 0.794}, {'end': 573.856, 'start': 554.321, 'weight': 0.723}], 'summary': 'This tutorial series covers creating a spring boot application with spring data jpa and spring mvc, setting up an h2 in-memory database, building an alien management system, configuring the h2 database and enabling jpa in spring boot, and implementing spring data jpa for database operations with a focus on simplicity and minimal code.', 'chapters': [{'end': 85.924, 'segs': [{'end': 37.717, 'src': 'embed', 'start': 4.827, 'weight': 0, 'content': [{'end': 5.868, 'text': 'Welcome back aliens.', 'start': 4.827, 'duration': 1.041}, {'end': 6.889, 'text': 'My name is Devind Reddy.', 'start': 6.088, 'duration': 0.801}, {'end': 14.318, 'text': 'And in this video, we will create a Spring Boot application using Spring Data JPA and Spring MVC.', 'start': 7.29, 'duration': 7.028}, {'end': 18.342, 'text': "Normally we'll create a webpage where you will try to add some data in database.", 'start': 14.398, 'duration': 3.944}, {'end': 19.384, 'text': "We'll try to fetch something.", 'start': 18.362, 'duration': 1.022}, {'end': 21.585, 'text': "So let's see how do we do that.", 'start': 19.924, 'duration': 1.661}, {'end': 22.926, 'text': "We'll create a project here.", 'start': 21.966, 'duration': 0.96}, {'end': 26.849, 'text': 'fresh project, I would say new Spring Styler project.', 'start': 22.926, 'duration': 3.923}, {'end': 32.493, 'text': 'give a name to it, I would say Spring Boot JPA, and then I will say next', 'start': 26.849, 'duration': 5.644}, {'end': 37.717, 'text': 'Now here, what are the things we need? Now first of all, we are making a web project, so I would say web.', 'start': 32.834, 'duration': 4.883}], 'summary': 'Devind reddy creates a spring boot app with spring data jpa and spring mvc to add and fetch data in a web project.', 'duration': 32.89, 'max_score': 4.827, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YywLS8XdxLQ/pics/YywLS8XdxLQ4827.jpg'}, {'end': 75.475, 'src': 'embed', 'start': 47.204, 'weight': 2, 'content': [{'end': 49.804, 'text': 'For example, we can use MySQL, we can use Postgres.', 'start': 47.204, 'duration': 2.6}, {'end': 57.106, 'text': "Now, just for this example, I'll be using an in-memory database, which is we can use H2 database, which is in-memory database.", 'start': 50.164, 'duration': 6.942}, {'end': 59.407, 'text': 'And of course, we can use any database you want.', 'start': 57.487, 'duration': 1.92}, {'end': 62.588, 'text': "And then we'll click on next because there's three things we need.", 'start': 59.927, 'duration': 2.661}, {'end': 65.069, 'text': "Then we'll click on next and we'll click on finish.", 'start': 63.068, 'duration': 2.001}, {'end': 67.67, 'text': 'The moment you click on finish, you will get your project.', 'start': 65.609, 'duration': 2.061}, {'end': 68.73, 'text': 'Of course, it will take some time.', 'start': 67.73, 'duration': 1}, {'end': 73.894, 'text': 'so, yes, we got our project and you can see, we got our project, which is called as boot jpa.', 'start': 69.25, 'duration': 4.644}, {'end': 75.475, 'text': 'now, what exactly i want now?', 'start': 73.894, 'duration': 1.581}], 'summary': "Using an in-memory database like h2, the project 'boot jpa' was successfully created after clicking 'finish', despite taking some time.", 'duration': 28.271, 'max_score': 47.204, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YywLS8XdxLQ/pics/YywLS8XdxLQ47204.jpg'}], 'start': 4.827, 'title': 'Creating spring boot application', 'summary': 'Demonstrates the process of creating a spring boot application using spring data jpa and spring mvc, including setting up a new project, choosing a database (h2 in-memory), and the goal of creating an application for adding aliens.', 'chapters': [{'end': 85.924, 'start': 4.827, 'title': 'Creating spring boot application with spring data jpa and spring mvc', 'summary': 'Demonstrates the process of creating a spring boot application using spring data jpa and spring mvc, including setting up a new project, choosing a database (h2 in-memory in this case), and the goal of creating an application where aliens can be added.', 'duration': 81.097, 'highlights': ['The chapter demonstrates the process of creating a Spring Boot application using Spring Data JPA and Spring MVC, including setting up a new project, choosing a database (H2 in-memory in this case), and the goal of creating an application where aliens can be added.', 'Devind Reddy will show how to create a Spring Boot application using Spring Data JPA and Spring MVC, and the process of setting up a new project.', 'The demonstration includes selecting a database for the project, with the example showcasing the use of an in-memory database (H2).', 'The goal of the application is to allow the addition of aliens, showcasing the practical usage of the created Spring Boot application.']}], 'duration': 81.097, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YywLS8XdxLQ/pics/YywLS8XdxLQ4827.jpg', 'highlights': ['Devind Reddy will show how to create a Spring Boot application using Spring Data JPA and Spring MVC, and the process of setting up a new project.', 'The chapter demonstrates the process of creating a Spring Boot application using Spring Data JPA and Spring MVC, including setting up a new project, choosing a database (H2 in-memory in this case), and the goal of creating an application where aliens can be added.', 'The demonstration includes selecting a database for the project, with the example showcasing the use of an in-memory database (H2).', 'The goal of the application is to allow the addition of aliens, showcasing the practical usage of the created Spring Boot application.']}, {'end': 297.681, 'segs': [{'end': 114.003, 'src': 'embed', 'start': 85.924, 'weight': 0, 'content': [{'end': 90.587, 'text': 'i can fetch aliens, So maybe I want to add new aliens.', 'start': 85.924, 'duration': 4.663}, {'end': 92.628, 'text': 'In aliens, I will be having two parameters.', 'start': 90.927, 'duration': 1.701}, {'end': 100.333, 'text': "One is I'll be having the name of the alien and then I will be having an ID for the alien.", 'start': 93.249, 'duration': 7.084}, {'end': 102.915, 'text': 'So just to show you that I will need a class.', 'start': 100.974, 'duration': 1.941}, {'end': 108.119, 'text': "I'll put that in a model package and the class name would be alien.", 'start': 103.396, 'duration': 4.723}, {'end': 110.861, 'text': 'And in this class alien, I just need two things.', 'start': 108.239, 'duration': 2.622}, {'end': 114.003, 'text': 'One is AID and the second thing is the name.', 'start': 111.021, 'duration': 2.982}], 'summary': 'Creating a model for aliens with two parameters, aid and name.', 'duration': 28.079, 'max_score': 85.924, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YywLS8XdxLQ/pics/YywLS8XdxLQ85924.jpg'}, {'end': 157.25, 'src': 'heatmap', 'start': 127.607, 'weight': 1, 'content': [{'end': 130.488, 'text': 'Now what I want is I want a page where I will be able to add those values.', 'start': 127.607, 'duration': 2.881}, {'end': 137.369, 'text': 'So in the resources, in fact, inside main, I want a folder where I would call it as web app.', 'start': 131.108, 'duration': 6.261}, {'end': 139.19, 'text': 'And inside this web app, I will be getting a JSP.', 'start': 137.429, 'duration': 1.761}, {'end': 143.735, 'text': 'So I would say jsp and I will name this jsp as home.jsp.', 'start': 139.79, 'duration': 3.945}, {'end': 145.997, 'text': 'This is where I will be putting my values.', 'start': 144.295, 'duration': 1.702}, {'end': 151.764, 'text': 'Now what are the fields I need? I need a form tag where I will be able to add those, I will be able to put those two values.', 'start': 146.498, 'duration': 5.266}, {'end': 157.25, 'text': 'So this is what we want, right? We want a form and a user will enter two values, a id, a name.', 'start': 152.285, 'duration': 4.965}], 'summary': 'Create a web page to add form fields for id and name.', 'duration': 29.643, 'max_score': 127.607, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YywLS8XdxLQ/pics/YywLS8XdxLQ127607.jpg'}, {'end': 275.522, 'src': 'heatmap', 'start': 233.59, 'weight': 2, 'content': [{'end': 237.775, 'text': 'first of all I want to make this as a controller, because without this it will not work.', 'start': 233.59, 'duration': 4.185}, {'end': 244.063, 'text': 'And here I want to say at request mapping and in this I want to specify the path.', 'start': 238.376, 'duration': 5.687}, {'end': 247.447, 'text': 'So whenever I call the home page it should call home.jsp.', 'start': 244.083, 'duration': 3.364}, {'end': 250.03, 'text': 'Oh I missed one thing it should be double quotes here.', 'start': 247.928, 'duration': 2.102}, {'end': 252.452, 'text': 'okay, everything seems good.', 'start': 250.851, 'duration': 1.601}, {'end': 254.652, 'text': "now, if i run this project, let's see if it is working.", 'start': 252.452, 'duration': 2.2}, {'end': 262.135, 'text': 'so i will just relaunch the application and i will go back there and say enter, oh, you can see, it is still not working because we missed one thing.', 'start': 254.652, 'duration': 7.483}, {'end': 266.056, 'text': 'remember, uh, we are yet to add the jasper.', 'start': 262.135, 'duration': 3.921}, {'end': 271.378, 'text': 'right when you are working with jsp, we need to add a palm file, which we need to add one more dependency, which is jasper.', 'start': 266.056, 'duration': 5.322}, {'end': 272.499, 'text': 'And how do we get that??', 'start': 271.698, 'duration': 0.801}, {'end': 275.522, 'text': 'We just go to MVN repository search for Tomcat.', 'start': 272.519, 'duration': 3.003}], 'summary': 'Configuring a controller with request mapping to call home.jsp, adding jasper dependency for working with jsp.', 'duration': 41.932, 'max_score': 233.59, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YywLS8XdxLQ/pics/YywLS8XdxLQ233590.jpg'}], 'start': 85.924, 'title': 'Building alien management system', 'summary': 'Discusses creating an alien management system using spring boot, enabling users to add and fetch alien data, incorporating a controller and jsp dependencies.', 'chapters': [{'end': 151.764, 'start': 85.924, 'title': 'Alien class and web page creation', 'summary': 'Discusses the creation of an alien class with two parameters - name and id, along with the implementation of a web page using jsp to input and display these values.', 'duration': 65.84, 'highlights': ['A class named alien is created with two parameters - ID and name, along with the implementation of getters, setters, and a toString method.', 'A JSP page named home.jsp is created within a web app folder to input and display the values of the Alien class.']}, {'end': 297.681, 'start': 152.285, 'title': 'Building alien management system', 'summary': 'Outlines the process of creating an alien management system using spring boot, where users can add and fetch alien data, requiring the addition of a controller and jsp dependencies.', 'duration': 145.396, 'highlights': ['Users can add two values, an id and a name, which will be stored in the database. The user will enter two values, a id, a name. The moment I click on submit, it will call add alien and this aliens will be added in database.', "The need for a controller to call the home.jsp page and make the application functional. You need a controller to call that page, right? That's how Spring MVC works. You need to make it flow. And to do that, of course, we need a controller and we have not done that yet.", 'The addition of JSP dependencies, specifically Jasper, to make the JSP functionality work. We are yet to add the jasper. right when you are working with jsp, we need to add a palm file, which we need to add one more dependency, which is jasper.']}], 'duration': 211.757, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YywLS8XdxLQ/pics/YywLS8XdxLQ85924.jpg', 'highlights': ['A class named alien is created with two parameters - ID and name, along with the implementation of getters, setters, and a toString method.', 'A JSP page named home.jsp is created within a web app folder to input and display the values of the Alien class.', 'The need for a controller to call the home.jsp page and make the application functional.', 'The addition of JSP dependencies, specifically Jasper, to make the JSP functionality work.']}, {'end': 632.136, 'segs': [{'end': 367.851, 'src': 'embed', 'start': 336.961, 'weight': 0, 'content': [{'end': 340.444, 'text': 'Now luckily, Spring Boot has a concept of auto configuration.', 'start': 336.961, 'duration': 3.483}, {'end': 342.444, 'text': 'and it will do the configuration for you.', 'start': 341.064, 'duration': 1.38}, {'end': 344.525, 'text': 'You just need to specify what you want.', 'start': 342.905, 'duration': 1.62}, {'end': 347.446, 'text': 'And the way you do that is by going to a resource.', 'start': 345.165, 'duration': 2.281}, {'end': 355.408, 'text': 'In this application.properties, you just need to set one property, which is spring.h2, is it there? Yes, .console.', 'start': 348.106, 'duration': 7.302}, {'end': 358.149, 'text': "You just need to say enable equal to true, that's it.", 'start': 355.728, 'duration': 2.421}, {'end': 359.589, 'text': "That's the first thing you do.", 'start': 358.629, 'duration': 0.96}, {'end': 363.03, 'text': "Now, you need to also mention the platform where you're working with.", 'start': 360.109, 'duration': 2.921}, {'end': 367.851, 'text': 'So you have to say spring data source dot platform.', 'start': 363.71, 'duration': 4.141}], 'summary': "Spring boot's auto configuration simplifies setup by requiring minimal property settings.", 'duration': 30.89, 'max_score': 336.961, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YywLS8XdxLQ/pics/YywLS8XdxLQ336961.jpg'}, {'end': 445.41, 'src': 'heatmap', 'start': 388.277, 'weight': 0.841, 'content': [{'end': 394.878, 'text': 'Now, the URL is JDBC colon H2 colon MEM, and now you can mention any database you want.', 'start': 388.277, 'duration': 6.601}, {'end': 395.899, 'text': 'So I would say Navin here.', 'start': 395.038, 'duration': 0.861}, {'end': 397.739, 'text': 'But how would I access the database?', 'start': 396.399, 'duration': 1.34}, {'end': 401.32, 'text': 'Because if you are using MySQL, you have an external application to work with right?', 'start': 397.779, 'duration': 3.541}, {'end': 408.761, 'text': 'Here what you will do is you will just restart the application or relaunch it, and the way you can access your H2 database is very simple.', 'start': 401.9, 'duration': 6.861}, {'end': 410.102, 'text': 'Just go back to your browser.', 'start': 409.121, 'duration': 0.981}, {'end': 417.725, 'text': 'I will not be using Maven anymore, so I will just come back here and I would say hey, I want to access my console the way you do,', 'start': 411.202, 'duration': 6.523}, {'end': 422.931, 'text': 'that is by saying localhost colon 8080 slash h2 hyphen console.', 'start': 417.725, 'duration': 5.206}, {'end': 427.136, 'text': 'You just have to say h2 hyphen console, it will give you a login page.', 'start': 423.592, 'duration': 3.544}, {'end': 430.48, 'text': 'Now it will say driver name, it will specify JDBC URL.', 'start': 427.697, 'duration': 2.783}, {'end': 435.326, 'text': 'Now this is something which you have configured in your database, right? This is what, in the application, this is what you have mentioned.', 'start': 430.781, 'duration': 4.545}, {'end': 437.107, 'text': 'the username, which is sa.', 'start': 436.087, 'duration': 1.02}, {'end': 439.308, 'text': "don't change username, don't change the password because pass,", 'start': 437.107, 'duration': 2.201}, {'end': 444.17, 'text': "we don't need password there and simply click on test connection and you can see test successful, right.", 'start': 439.308, 'duration': 4.862}, {'end': 445.41, 'text': 'so you are ready to go ahead.', 'start': 444.17, 'duration': 1.24}], 'summary': "Access h2 database via localhost:8080/h2-console with username 'sa' and no password, test connection successful.", 'duration': 57.133, 'max_score': 388.277, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YywLS8XdxLQ/pics/YywLS8XdxLQ388277.jpg'}, {'end': 427.136, 'src': 'embed', 'start': 401.9, 'weight': 1, 'content': [{'end': 408.761, 'text': 'Here what you will do is you will just restart the application or relaunch it, and the way you can access your H2 database is very simple.', 'start': 401.9, 'duration': 6.861}, {'end': 410.102, 'text': 'Just go back to your browser.', 'start': 409.121, 'duration': 0.981}, {'end': 417.725, 'text': 'I will not be using Maven anymore, so I will just come back here and I would say hey, I want to access my console the way you do,', 'start': 411.202, 'duration': 6.523}, {'end': 422.931, 'text': 'that is by saying localhost colon 8080 slash h2 hyphen console.', 'start': 417.725, 'duration': 5.206}, {'end': 427.136, 'text': 'You just have to say h2 hyphen console, it will give you a login page.', 'start': 423.592, 'duration': 3.544}], 'summary': 'To access the h2 database, restart the application and go to localhost:8080/h2-console to access the login page.', 'duration': 25.236, 'max_score': 401.9, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YywLS8XdxLQ/pics/YywLS8XdxLQ401900.jpg'}, {'end': 486.559, 'src': 'embed', 'start': 458.277, 'weight': 2, 'content': [{'end': 461.219, 'text': 'And you can see we have not configured JPA yet.', 'start': 458.277, 'duration': 2.942}, {'end': 465.722, 'text': 'Do we need to do that? Do we need to configure JPA? You just need to do one thing.', 'start': 461.679, 'duration': 4.043}, {'end': 468.644, 'text': 'In the annotation, you have to say at entity.', 'start': 466.162, 'duration': 2.482}, {'end': 471.185, 'text': 'And here you have to say at ID.', 'start': 469.244, 'duration': 1.941}, {'end': 475.288, 'text': "This is the thing we need, right? We have to specify that that's an entity and this is the ID.", 'start': 471.265, 'duration': 4.023}, {'end': 477.89, 'text': 'Now to also make it work, first of all, you have to input the package.', 'start': 475.768, 'duration': 2.122}, {'end': 481.173, 'text': 'now to make it work, we also need some data in the table.', 'start': 478.45, 'duration': 2.723}, {'end': 484.597, 'text': 'right? if you have a table, of course you should be having some blank data now.', 'start': 481.173, 'duration': 3.424}, {'end': 486.559, 'text': 'spring boot will do, will give it to you.', 'start': 484.597, 'duration': 1.962}], 'summary': 'Configuring jpa with entity and id annotations to input package and table data for spring boot.', 'duration': 28.282, 'max_score': 458.277, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YywLS8XdxLQ/pics/YywLS8XdxLQ458277.jpg'}, {'end': 540.712, 'src': 'heatmap', 'start': 517.51, 'weight': 3, 'content': [{'end': 518.693, 'text': 'I want to add some data.', 'start': 517.51, 'duration': 1.183}, {'end': 519.754, 'text': 'You can do it from here.', 'start': 518.712, 'duration': 1.042}, {'end': 522.515, 'text': 'or if you want some data pre-hand.', 'start': 520.414, 'duration': 2.101}, {'end': 525.058, 'text': 'what you can do is you can create a separate data file.', 'start': 522.515, 'duration': 2.543}, {'end': 531.364, 'text': 'you can say new, i would say a file, simple file, and i will name this file as data.sql.', 'start': 525.058, 'duration': 6.306}, {'end': 535.928, 'text': 'so we got data.sql there and i will open that with with a text editor.', 'start': 531.364, 'duration': 4.564}, {'end': 538.07, 'text': 'okay, you can see, we got this thing here.', 'start': 535.928, 'duration': 2.142}, {'end': 539.851, 'text': 'you can write a statement to insert data.', 'start': 538.07, 'duration': 1.781}, {'end': 540.712, 'text': "okay, it's not compulsory.", 'start': 539.851, 'duration': 0.861}], 'summary': 'Instructions for adding data to a data file named data.sql using a text editor.', 'duration': 59.539, 'max_score': 517.51, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YywLS8XdxLQ/pics/YywLS8XdxLQ517510.jpg'}, {'end': 582.764, 'src': 'heatmap', 'start': 554.321, 'weight': 0.723, 'content': [{'end': 561.106, 'text': 'so i would say 101, and the name here i want is no, at least i want this data there and after doing that, let me just relaunch it.', 'start': 554.321, 'duration': 6.785}, {'end': 562.406, 'text': 'just verify if it is.', 'start': 561.106, 'duration': 1.3}, {'end': 564.148, 'text': "if data is coming there, I'll go back to browser.", 'start': 562.406, 'duration': 1.742}, {'end': 566.91, 'text': "I will just simply copy this so that I don't have to type it again.", 'start': 564.168, 'duration': 2.742}, {'end': 568.231, 'text': 'I will refresh the database.', 'start': 567.37, 'duration': 0.861}, {'end': 569.112, 'text': 'I will say connect.', 'start': 568.431, 'duration': 0.681}, {'end': 570.753, 'text': 'You can see we got alien.', 'start': 569.572, 'duration': 1.181}, {'end': 573.856, 'text': 'If I say run this query, you can see that we got data.', 'start': 570.854, 'duration': 3.002}, {'end': 577.499, 'text': 'So your Spring Boot is actually loading that file at one time.', 'start': 574.397, 'duration': 3.102}, {'end': 582.764, 'text': 'So you can write any number of SQL statement you want if you want to have that database to work with.', 'start': 577.98, 'duration': 4.784}], 'summary': 'Using 101, the speaker successfully retrieves data and connects to the database, demonstrating the functionality of spring boot.', 'duration': 28.443, 'max_score': 554.321, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YywLS8XdxLQ/pics/YywLS8XdxLQ554321.jpg'}, {'end': 605.281, 'src': 'embed', 'start': 577.98, 'weight': 5, 'content': [{'end': 582.764, 'text': 'So you can write any number of SQL statement you want if you want to have that database to work with.', 'start': 577.98, 'duration': 4.784}, {'end': 587.728, 'text': 'Now what I want is I want to add some data, right? More data, not from here, but from the page.', 'start': 583.084, 'duration': 4.644}, {'end': 591.872, 'text': 'So what I will do is from the home.jsp will click on submit.', 'start': 588.349, 'duration': 3.523}, {'end': 593.193, 'text': 'it will call add alien.', 'start': 591.872, 'duration': 1.321}, {'end': 596.935, 'text': "but if you can see, we don't have any controller who will accept add alien.", 'start': 593.193, 'duration': 3.742}, {'end': 597.696, 'text': "so let's create one.", 'start': 596.935, 'duration': 0.761}, {'end': 605.281, 'text': 'so i would say public string, i would say add alien and from here itself again i will call the same home page.', 'start': 597.696, 'duration': 7.585}], 'summary': "Adding data to the database by creating a new controller to accept 'add alien' requests.", 'duration': 27.301, 'max_score': 577.98, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YywLS8XdxLQ/pics/YywLS8XdxLQ577980.jpg'}], 'start': 297.701, 'title': 'Configuring h2 database and enabling jpa in spring boot', 'summary': 'Details the process of enabling h2 database in spring boot by configuring the application.properties file, specifying the platform and url, and accessing the database console, along with the steps to enable jpa by using annotations. it also discusses the creation of a table using spring boot, verification of table and data, addition of data using data.sql file, and creation of a controller to handle data submission from the page.', 'chapters': [{'end': 477.89, 'start': 297.701, 'title': 'Configuring h2 database and enabling jpa', 'summary': 'Details the process of enabling h2 database in spring boot by configuring the application.properties file, specifying the platform and url, and accessing the database console, along with the steps to enable jpa by using annotations.', 'duration': 180.189, 'highlights': ["The way to enable H2 database is by specifying 'spring.h2.console.enable=true' in the application.properties file, setting the platform as H2, and specifying the database URL, like 'JDBC:H2:MEM'.", "Accessing the H2 database console can be done by restarting the application and then accessing 'localhost:8080/h2-console', where the default username is 'sa' and no password is required.", "Enabling JPA involves using annotations '@Entity' and '@ID' to specify the entity and the ID, respectively, to make it work within the package."]}, {'end': 632.136, 'start': 478.45, 'title': 'Spring boot table data and data insertion', 'summary': 'Discusses the creation of a table using spring boot, verification of table and data, addition of data using data.sql file, and creation of a controller to handle data submission from the page.', 'duration': 153.686, 'highlights': ['Spring Boot creates a table and auto-configures it, demonstrated by the process of verification and retrieval of data from the table. table creation, data verification', 'Demonstrates the process of adding data using a data.sql file and the risks involved with using an in-memory database. data insertion, in-memory database usage', 'Creation of a controller to handle data submission from the page and the usage of the model object to assign incoming data. controller creation, data submission handling']}], 'duration': 334.435, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YywLS8XdxLQ/pics/YywLS8XdxLQ297701.jpg', 'highlights': ["The way to enable H2 database is by specifying 'spring.h2.console.enable=true' in the application.properties file, setting the platform as H2, and specifying the database URL, like 'JDBC:H2:MEM'.", "Accessing the H2 database console can be done by restarting the application and then accessing 'localhost:8080/h2-console', where the default username is 'sa' and no password is required.", "Enabling JPA involves using annotations '@Entity' and '@ID' to specify the entity and the ID, respectively, to make it work within the package.", 'Spring Boot creates a table and auto-configures it, demonstrated by the process of verification and retrieval of data from the table.', 'Demonstrates the process of adding data using a data.sql file and the risks involved with using an in-memory database.', 'Creation of a controller to handle data submission from the page and the usage of the model object to assign incoming data.']}, {'end': 907.786, 'segs': [{'end': 660.011, 'src': 'embed', 'start': 632.156, 'weight': 1, 'content': [{'end': 635.738, 'text': "It's that beautiful, right? Okay, everything seems good, everything seems good.", 'start': 632.156, 'duration': 3.582}, {'end': 638.359, 'text': 'But then how will you add data in database?', 'start': 635.818, 'duration': 2.541}, {'end': 641, 'text': 'If you remember, we need to write JDBC code right?', 'start': 639.039, 'duration': 1.961}, {'end': 643.522, 'text': 'Or in JPA or in Hypernet?', 'start': 641.26, 'duration': 2.262}, {'end': 645.783, 'text': 'we need to have a repository link.', 'start': 643.522, 'duration': 2.261}, {'end': 649.545, 'text': 'We have to create a separate code using which you can add.', 'start': 645.823, 'duration': 3.722}, {'end': 651.347, 'text': 'We will do that here as well.', 'start': 649.565, 'duration': 1.782}, {'end': 656.75, 'text': 'Normally what you do is we first create interface and then we create a class which implements that interface.', 'start': 651.647, 'duration': 5.103}, {'end': 658.571, 'text': "So let's get the interface first.", 'start': 657.25, 'duration': 1.321}, {'end': 660.011, 'text': 'So I would say Neo.', 'start': 658.871, 'duration': 1.14}], 'summary': 'Creating a repository link to add data using jdbc, jpa, or hypernet.', 'duration': 27.855, 'max_score': 632.156, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YywLS8XdxLQ/pics/YywLS8XdxLQ632156.jpg'}, {'end': 705.36, 'src': 'embed', 'start': 674.436, 'weight': 0, 'content': [{'end': 677.157, 'text': 'This is where I want all my repositories and click on Finish.', 'start': 674.436, 'duration': 2.721}, {'end': 680.38, 'text': 'Now this repository will have some methods right?', 'start': 677.777, 'duration': 2.603}, {'end': 681.502, 'text': 'Which is normally.', 'start': 680.5, 'duration': 1.002}, {'end': 683.464, 'text': 'we create, we apply code operations right?', 'start': 681.502, 'duration': 1.962}, {'end': 686.007, 'text': 'We say create, update, delete and all those stuff.', 'start': 683.484, 'duration': 2.523}, {'end': 693.335, 'text': 'Now, since we are using Data JPA, Spring Data JPA, it gives you these awesome features, so just be with me to see the magic.', 'start': 686.467, 'duration': 6.868}, {'end': 700.338, 'text': 'What I will do is I will simply extend this interface with another interface called as code repository and we will say hey,', 'start': 693.976, 'duration': 6.362}, {'end': 705.36, 'text': 'you are responsible to work with alien and the primary keys of type integer.', 'start': 700.338, 'duration': 5.022}], 'summary': 'Using spring data jpa to create repositories with code operations and extended interfaces.', 'duration': 30.924, 'max_score': 674.436, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YywLS8XdxLQ/pics/YywLS8XdxLQ674436.jpg'}, {'end': 894.735, 'src': 'embed', 'start': 856.8, 'weight': 2, 'content': [{'end': 859.381, 'text': 'Spring Data REST is responsible to do that for you.', 'start': 856.8, 'duration': 2.581}, {'end': 866.622, 'text': "So behind the scene, there are some classes which is doing it for you, right? Because you don't have to think much about it.", 'start': 859.921, 'duration': 6.701}, {'end': 869.363, 'text': 'And of course you can perform all the code operations.', 'start': 867.183, 'duration': 2.18}, {'end': 875.324, 'text': "But what if you want to do something else? Now that's a question, right? We will try to answer that question in the coming videos.", 'start': 869.703, 'duration': 5.621}, {'end': 878.125, 'text': 'But then at this point, this is working for you.', 'start': 875.344, 'duration': 2.781}, {'end': 882.746, 'text': 'So you can save, you can fetch, you can update, you can delete, all the methods are available.', 'start': 878.445, 'duration': 4.301}, {'end': 885.507, 'text': 'Just try it by yourself and it should work.', 'start': 883.266, 'duration': 2.241}, {'end': 887.188, 'text': 'so in the pom file as well.', 'start': 886.167, 'duration': 1.021}, {'end': 888.629, 'text': 'we have not done any changes much.', 'start': 887.188, 'duration': 1.441}, {'end': 894.735, 'text': 'we just added the tomcat jasper, and here you just need to add these three things you have to enable your h2.', 'start': 888.629, 'duration': 6.106}], 'summary': 'Spring data rest simplifies operations, enabling save, fetch, update, delete methods with minimal changes.', 'duration': 37.935, 'max_score': 856.8, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YywLS8XdxLQ/pics/YywLS8XdxLQ856800.jpg'}], 'start': 632.156, 'title': 'Implementing spring data jpa', 'summary': 'Demonstrates the implementation of spring data jpa for database operations, showcasing repository creation, crud operations, and spring data rest features, focusing on simplicity and minimal code.', 'chapters': [{'end': 907.786, 'start': 632.156, 'title': 'Implementing spring data jpa for database operations', 'summary': 'Demonstrates the implementation of spring data jpa for database operations, showcasing how to create repositories, perform crud operations, and leverage spring data rest features, with a focus on simplicity and minimal code.', 'duration': 275.63, 'highlights': ['Spring Data JPA provides the ability to create repositories for database operations, minimizing the need to write JDBC or JPA code. The chapter emphasizes the simplicity of creating repositories in Spring Data JPA, reducing the reliance on writing JDBC or JPA code.', 'Extending an interface with another interface, such as JpaRepository, automatically provides CRUD operations for the specified entity. The use of JpaRepository interface automatically provides CRUD operations for the specified entity, showcasing the convenience of extending interfaces in Spring Data JPA.', "The demonstration highlights the ease of adding data to the database using Spring Data JPA, with minimal code and reliance on Spring Boot's functionality. The chapter showcases the ease of adding data to the database using Spring Data JPA, emphasizing minimal code and the efficiency of Spring Boot's functionality.", 'The implementation showcases the simplicity of using Spring Data REST for performing CRUD operations without the need for extensive manual coding. The usage of Spring Data REST simplifies the process of performing CRUD operations, reducing the requirement for extensive manual coding.', 'The configuration process for enabling H2 and specifying the data source in the pom file is highlighted, emphasizing minimal changes required for database setup. The chapter emphasizes the minimal configuration process for enabling H2 and specifying the data source in the pom file, showcasing the simplicity of database setup in Spring Data JPA.']}], 'duration': 275.63, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/YywLS8XdxLQ/pics/YywLS8XdxLQ632156.jpg', 'highlights': ['Extending JpaRepository interface provides CRUD operations for the entity', 'Ease of adding data to database using Spring Data JPA with minimal code', 'Simplicity of using Spring Data REST for CRUD operations without extensive coding', 'Minimal configuration process for enabling H2 and specifying data source']}], 'highlights': ['The chapter demonstrates the process of creating a Spring Boot application using Spring Data JPA and Spring MVC, including setting up a new project, choosing a database (H2 in-memory in this case), and the goal of creating an application where aliens can be added.', 'A class named alien is created with two parameters - ID and name, along with the implementation of getters, setters, and a toString method.', "The way to enable H2 database is by specifying 'spring.h2.console.enable=true' in the application.properties file, setting the platform as H2, and specifying the database URL, like 'JDBC:H2:MEM'.", 'Extending JpaRepository interface provides CRUD operations for the entity']}