Spring Boot Tutorials For Beginners in Tamil | Building End to End Spring Boot Application

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to quarterback in the video our springboard application end to end every billboard and step by step so goes to something called controller so spring controller so in the springboard application live there is a controller uh so spring traditional spring application level controller no back pulling you know the initial days list request first foreign we will create a simple repository might want to create money either repository is nothing but a component uh spring component okay so either without explaining let's get into the application let's um other patina details so just spring tool suit open so workspace so now on there spring boot um so i'm going to call it a celica movie list okay so if uh sts i'm going to go up on it uh let's create a new project from scratch okay so uh in getting a clickbank create a new springboard starter project in poland on the india put file file operator new uh spring starter project they click running now uh so basic information for sticky will gain the name of the project name of the in the artifact basically when the sonar movie listener okay on the group id even the com dot code version i'm using 14 uh package on the number select monica uh version either zero zero snapshot is fine uh in the package when the calm this is an important step so again on our new spring boot up dependencies in an abbreviated so in the application built under the moon dependency we know so first so front end is okay web application is okay so web application um [Music] and also one more important foreign so okay project importer um so if uh and then i just usually i'll keep the console open console view [Music] [Music] so let's stop and build the first component first in the application flow diagram spring controller on first grade one overall okay uh so get end point watch so spring controller crate the package uh class okay so movie list say let's call it as a movie list controller okay [Music] just finished [Music] of dna so at controller administer uh space uh control space coulda think in a autocomplete now so we are telling [Music] is apd on the page handleband rather than apart so other kidney or annotation you know update now on the at request mapping of dnr annotation so basically then sort of the spring springboard if i know and create one up for another simple method on a great one for so public string you know get movie uh get movie list by actor great particularly name one or single string so and also there should be one more for method http method so other http method is very important if a method equal to obtain an i say for example in given uh say method equals uh get to the university of code partner for it so i'll go on the request math method dot get okay so either any get request in getting the method uh the control transformer um so on the in the url and the url defined manual so given the slash installed wrong so in the method hit under the gainer url updating the defined banana value equals um so if i say for example now on the movies obviously so just okay so even upon your controller create paneer chrome and the request mapping on the base request mapping either in the class level request mapping method level one the movies no url create money uh any get request and the http get request only in the method so i'm going to stop now let's start the server okay so for movies somewhere um other canoe template on the time leaf template and now in the view we play the display for now string rather than the is nothing but it it should be a name of the template so if a number or a template upon creator nobody now so movie list html have been known uh file movie let's start html i didn't create button now it's a basic html file so in given that you're just standing here okay on the html so head um if a next in the uh flow diagram pathing now but in the controller next to and then you know uh even the back end or connection so i think when the first one is name html file loader name so another particular the movie list in the movie let's start html in the file order name and exactly same and also with the one important running in notepad template synchro folder color canon in the html file up on the spring boot application automatically and the file and the folder on the it will um look up that folder opening wearing a great one you know you might get an error in my event in the html file like uh identify phonometer so html file transfer data for every database under the other language so before database code and i'm connected to the community uh number sample data on there a hardcore 201 in the screen sharing you're participating new class dot mod movies dot model okay so the package name uh [Music] [Music] movie name one private string uh movie description movie description [Music] on a private string movie description cover actor name so actor uh so let's let's call it as a actor okay so movie description movie uh named [Music] say for example in a movie uh moving or a new instance great fundraiser say tom so movie dot set description and then say mi three movie dot set name um set name the mi three so either in the description in the return type one in a view name it is not a data so return upon data when i'm written front end so you know in the html just to plain and simple hello no display font wrong spring framework ui so in the package foreign framework for the class so the model object the model object password uh in the model object learning a set one line either in the object okay so now uh model dot set uh i think it's add attribute add attribute of the insulator name value basically now enough enough for now movies let's call it as movies [Music] say for example list of movies ninja venom of dinner list a great paneer and the list according to club so so are you till the new array list you know the movie so in the list 2 and this a let's call it as a movie list [Music] okay so movie list let's call it as a movies and then the movie listened model attribute like panicker so they end up under the indianapolis so basically on the in the spring model by default in the model object on the access circle and the template when they can access this model object movie listed foreign so just to save some time i've copied that code and given there just the front-end code motor copy party grab simple i'll explain okay so just in the html code okay so so in the html code and on the either either either just in a bootstrap css file so uh either optional alignment in the table uh so in the css file so header and render column basically so first column and then the movie name and the heading and these are allowing the actual value so i'm over movie movies controller so right click pane starter okay start er so if um um okay so i'll just open a chrome host jtt um in the url controller in the url given the slash movies okay so even a slash so um laundry interface now so they explained one more second package dot data access okay and name of the interface on this a let's call it as a movie list repository you have to extend jpa repository so jpa repository is on the spring we are telling spring that treat this interface as a jpa interface so jp database access under the interface java persistence api or interface spending on the default spring boot when the options [Music] [Music] say for example id is usually when the uh integer are long they use spelling clock long is a safer option it has a longer bit image online so so if in an interface on a great miniature the long id no not pandora so in the id then use funny database uh say id one uh name one with the laundry display id2 name two and the money so if an id on the database level in the generate one india uh there are a lot of uh ways you can generate the id in your sequential number one two three four one eleventh auto generation random [Music] [Music] type dot auto so auto generation so the annotation could have been parting you know on the strategy of doing it attribute so now for example the click money pattern so engaged a generated value of being annotation could be particular okay in the field name of the allowance of the cloud so it's a way of like um coding like a strategy [Music] in the list of movies i'm going to supporting the interface or the method in oracle so input in a noun say find say in let's call it as a find movies by actor okay so the input in look just the name of the actor name of the actor on the just to string them so not enough i don't know the string name okay so with an output in output on the list of movies one so in the interface or the method or output on the list of movies okay so i think it's movie object so let's turn just uh java list okay so in the interface so in the in the interface in the pineapple find movies by actor name of the actor and then it returns the list it will query the database based on the id uh based on the name what we pass it and then return this movie list okay uh so other integrations so instead of hard coding let's uh comment everything okay so common ponytail so if uh we don't know when the repository controller for the specific type of object i will try to look up look up [Music] so in the method learn the term earning at path variable i've been a declarator path variable of actor of dean good night actor so if a path variable or factor ah the inner type and the factor on the usual is just a string okay so movies to remove in the path variable acting the path variable in the name 11 eventually so in the name then amount in the repository so this is how we send from the url i okay start uploading um post call on this similar type of controller post request mapping okay so if i say no method public say add movie i've been on the creator in a written type in install right add movie um just okay response entity on the return panel and then so spring framework so in a response entity when they know you can just keep it as an object rumble generic command you know just on the response under 200 error 200 code or 404 roll any error codes so along with the response body okay um they know video okay data type on the consumer hobby insulator normalx consumes on the application json okay application slash json so if not either post request in the method or post requested movies [Music] response body response body is disallowed in this location sorry it's a response body request body okay so because the response when there's output either on the number number input basically so input on the request body so entire request ascending in the input okay so support panel the post uh creation is one of the method for example movie list repository dot i've been important now so method entity if you remember on the num the movie of being down on the download entity so in the moving object back end database okay so in given that save just in the movie object turn up in the instant instance in the input level and then return pandora return on the response bill pandra okay so response let's call it as a response entity response entity dot say response entity dot okay okay response now and then everything is successful of the inter just in the simple case success response dot build error handling learn i'm in the same example you know just to assume that this is going to work if it works is a more complex scenario in the line of code just add extensions [Music] on the wrestler or extension click now it's free free edition now in useful say say movies test okay so new project on create when it add a service add a request the request is [Music] let's test it server or nitric out community yeah server stopwatch let me start the server okay so server statistic now i have a post call now okay so https http localhost 80 200 response which means that no errors will have dinner let's um stop it and restart so i think on the errors and then um http so to console html memory database so spring dot h2 dot uh see console button auto complete console enabled on the trunk uh specifically a port number couldn't define panic so server dot port and the 8080 so by default 880 oh no 8081 code on there undefined funny clock so save on itunes h2 console number on the data on the we can check it out you can restart one drainage conglom so one more thing in a h2 and it's an in-memory database so you cannot start a stop and turn on the database it will get saved in the h2 database okay so let's let's post one okay let's post like two three records on the list along the way then test so one more post on this just copy party send then one more record so the console url there so in the jdbc url when the unique url over the running restart fundamental on the url on the different arc so h2 so h2 database is available here so in the url in console search pointing now and then here jdbc on the code component the moving rather than the entity create phenomena so with id name description actually so in the movie in the object on the update on the table of creator king is on the table movie id actor so [Music] um by default s configuration so you know literally now i do me on this spring configuration if i've been wiring and then i do make it just a few annotations here and there all about use for now so uh let's let's stop here um the other questions comments thank you for watching
Info
Channel: Coder Ulagam
Views: 55,592
Rating: undefined out of 5
Keywords: Spring Boot Tutorials, spring boot tutorial in tamil, spring boot-starter, spring boot example
Id: OgZQUkQPDyo
Channel Id: undefined
Length: 70min 51sec (4251 seconds)
Published: Tue Sep 08 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.