Step by Step Guide - VS Code for Spring Boot Java Development
HTML-код
- Опубликовано: 24 дек 2020
- This video is a step by step guide to setup and develop Spring Boot applications using Visual Studio Code. I will be building a simple Spring Boot service from scratch using VS Code. I'll show you what extensions to install and how to use the VS Code features to develop and iterate on your Spring Boot application
#javabrains #springboot
We need an updated version of this video, In two years lots of this has been improved. Please try this out in 2023.
Like this to let Java Brains know.
1:09 "none of us remember how to compile java code using the command line" heheheh you made my day!
of course I do: "mvn clean compile" ^_^
Having worked in visual studio for so long, this makes my life easy to transfer seamlessly into Java programming with a similar setup.
Sir awesome. Really appreciate that you even thought of trying this out. It does make a ton of sense for full stack developers and for financially tight freelancers. Your thought process is younger and fresher than ever. Love you sir ❤️🙏
Thank you! Yes, it’s handy when working on web apps for sure!
Terrific! I follow your creative works for 8 years already. Every course or tutorial are so great explained! Your are the brilliant influencer! Thank you for your inestimable job!
Thanks a lot - from people who use vs code for springboot
Right now, I'm revising this to get a Job at *Thinkify Labs*
This is perfect, I work in Intellij but on my personal machine I wanted a lighter weight solution. There's even an extension to import intellj key binds! Beautiful. Thanks for the video man!
Finally a video that is not trash. No, seriously, all the other videos sound like an NPC is reading from a text file. Your video is very good and has helped me very much, thanks
I'll say it here, I love switching between two editors. If you work on say Java and Typescript, you need to switch syntax and for me switching editor helps me with that somehow, I am so used to seeing Java in IntelliJ and Typescript in VSCode.
THIS WAS A BEAUTIFUL VIDEO FOR ME. As a salesforce developer , VSCode has been y GOTO place for all forms of development and i was hoping i wouldnt have to pay for intelliJ ultimate to learn Spring.
Thank you so much for this.
being a javascript developer I often have to switch to eclipse for java during development. This tutorial is going to be very helpful for me. Thank you
Great video. You are one of my favorite coding channels, because you explain things in a way that is both easy-to-follow and also informative. I think that using a split-screen layout, with your screen recording taking up most of the space and your live tutorial taking up the rest, is more effective at holding people's attention compared to just using a screen recording itself - it gives people a sense of face-to-face interaction which then helps them to remain focused on what is being instructed. So I think it's a very practical layout to continue using. Just my observation.
Havent you ever thought of opening a school and becoming full time teacher... I would love to join you .... you are too good...🙏🏻
In an alternative universe where teachers are paid well, and i can afford to quit my day job and still earn a decent living, perhaps!
@@Java.Brains Same here... waiting for that alternate universe to appear one day... 👍🏻👍🏻
He would be missing sharp and fresh real world experience then
@@ashishsadana1365 Same here too :)
This is just what I wanted. VS Code is quite flexible and powerful and I just love it. How to make the VS Code a go-to for a back-end developer. Thanks Koushik for making this great walkthrough from ground-up.
yeah my favorite thing about vs code is how modular it is
First comment at one of your videos (I wonder why because your tutorials saved me so many times I can't count them anymore). I'm a full stack dev and I use VScode for both frontend and backend. You just scratched the surface, there are so many more extensions you can use. Other AI autocomplete, autoformat on save, support for other platforms (quarkus and native builds anyone?) you name it.
Regarding this one, there's a tab at the bottom left I didn't see you touching (or maybe you did and I missed it) "Spring boot Dashboard", it allows you to run and debug, usefoul also when you have a bunch of spring projects and you want to run them all at once. I use it when I want to debug a bundle of microservices related to each other.
Thank you again for your awesome videos!
I don't understand how this line worked for you:
if (responseCodeCategory != 2 || responseCodeCategory != 3)
Shouldn't that be AND instead of OR?
Isn't this condition always TRUE, because being 2 and 3 is mutually exclusive?
this error had be debugging for so long.. lol
Excellent! It wasn't working for me, but I just wasn't in the mood to think and just != reversed to == and subsequently reversed output :D
I think he did that on purpose... or just didn't want to fix during video haha...this bug took 10 minutes of my life..
still great tutorial anyway
Yo man as it wasma first spring program was quite demotivated thanks mate for rectifying yu guys saved ma arshe
came here to say this
I want to tank you really about the excellent content about how to code for Spring Boot using VS Code and also you helped me to remember what I saw and learnt about Spring Boot so thanks again to save my time from wasting :)
This video is well over a year old however it still very much applies and was very helpful. Great job. Thank you for taking the time to do this.
Thank you for this Step-By_Step Video.
Really saved me a lot of time figuring stuff out basically on my own.
I honestly do not understand why your if-else branching works. If the response code is 2, it is NOT 3 and if it is 3, it is NOT 2. So the code didn't work properly for me, I adjusted it accordingly.
For working on large projects, you gotta increase xmx and xms in jdt vmargs. Current configs are tuned for container environment. And regarding that auto complete replacing is a feature. You can turn it off in setting
22:22 pretty sure it removed String because you auto completed without spacing out the words, I think it's more of a preference thing because I can see myself using that
Yes, I also think so. The same behavior I faced sometimes in Idea Intellij.
True, Idea does the same thing if you don't have space.
True and not true, you have 2 behaviors in Intellij, you can hit "tab" or "enter". "tab" will replace the word that is attached to the word you're trying and "enter" puts the new suggested word and retains the existing word after auto complete. I bet VS code has the same (maybe opposite key mapping tho)!
Great Tutorials. I'm feeling the same as what I felt while learning from my college professor. Thanks a lot !!
You should have tested debugging feature as well...
+1
+1
Netbeans Extension does it for ya
You`re awesome! Very good and useful guide! Thank you very much for this share!
First of your videos I've ever watched, and I have to say it is most excellent compared to so many others from other creators I've seen. Thanks so much for doing this!
Thanks so much!! Been learning python on VS Code and i absolutely love it, now i have to learn java, thanks for running through the basics, most appreciated!
Thank you.
Created my first spring boot java project..
it's really good I have been using vs code for java for the last 3 months its really a good "Free Tool" 😎😁😉
I have a feeling that you would do the best System Design videos.
Excuse me men! You drop something. your cr0wn bcz you are a man of god for me. I was looking for this. and could not find any related videos. thankyou so much.
Thanks for this vs code java tutorial.
Microsoft has been kicking it out of the park with softwares from last few years revamping their legacy softwares like VS CODE Visual studio use to be that huge ide which single handedly hogged all the cpu resources but now it's light and everything is an add on plug in.. Kudos to team microsoft on this!!
But my ♥️ will always be intellij with thier amazing IDE..
Ps there is even a intellij keybind plug in for vs code if you don't want to learn vs code shortcuts 😅
Good call on the key binding! Yes, VS Code is a completely different app from Visual Studio, and is both light and capable at the same time. They’ve really nailed the experience overall
there is
the extension name is IntelliJ IDEA Keybindings
by Keisuke Kato
Bravo, Bravo! Absolutely wonderful tutorial. Thank you!
Hii, I watched your videos 3 years ago when I just started programming thanks for all the help and I use Vs code for Spring development and it works fine .
Give a like to the coolest java teacher ever :)
Thanks! 😊
Thanks for nice tutorial Koushik... Recently I spent some time exploring VSCode for Spring project development. In most cases, it seems to meet expectations except for few cases where tedious workarounds are involved. Such as finding the implemenations of an interface, integration with Sonar server, formatting the code etc. Seems these will get improved eventually. From Intellij CE side, I noticed a plugin "Spring Assistant" to generate spring project from IDE itself.
You are awesome programmer face so funny , when I watching your video , thank you for you sharing
I was a bit skeptical to use VS Code for Spring Boot App development. But after watching your video I can at least give it a try with all these extensions/plugins. Thank you and Merry Christmas!!
How was your experience
Thanks for your video! I was looking for this for a long long time, I'm coming from C# using VS and now I'll need to work with Java, so in my point of view and with your video overview I think it's possible to stay using C# for all my stack.
At 22:55 "String" is removed because it was concatenated with the Annotation. Just adding a whitespace in between should do fine. And in 33:20 the way to add something to the same package is doing the same procedure but right-clicking on the io.javabrains.isthesiteup folder, not on src/main/java
Great video and explanations! I've used everything except VSCode for Java and I must say I'm excited to reboot my old NetBeans/Swing apps with Spring Boot :D
i suppose it shdve been this one if (responseCodeCategory ==2 && responseCodeCategory == 3) anywayz thanks man was searching the shit about this found ur vid reallly useful
Thanks so much for the helpful practical instruction!
bro, love you, i learned JavaScript and angular and angular js from you , love from India
Great video! Thank you. Looking forward to code Java in VSCode :)
The JAVA PROJECTS tab sometimes just doesn't load, the loading progress bar just keeps on loading. Did anybody face this issue?
Thanks for the video. I am also surprised by how well VS code works for Java/Spring development. I do have a critical issue with VS Code though. It demands a lot of resources, both CPU and memory. It locks up my PC a few times due to a lack of hardware resources on my Linux PC. Based on my experience, it requires at least 16 GB RAM to run smoothly.
What a mind reader, I've been working on getting to know and get used to vscode for spring boot, for the same reason where intellij is not free and eclipse feeling a bit dated
@@rarecase3666 Now where did you take that fact from? Could it be as dated as Eclipse is? Lmao I'm kidding but honestly I think VSCode is a game changer
Hi. I have a Maven Spring Boot application which takes profile parameters and spring boot arguments to run. For the life of me I cannot debug in VsCode. This is a set of topics you did not included here so I think it would be helpful to cover this more complex setup. Also, I think debugging is the most important feature of an IDE so you really should cover that. Thanks.
resourceful Video. Will like to enjoy videos like this....Great Work....Thank you!!!
Hi Koushik, nice video. I always found vs-code lighter than IntelliJ(including vs-code extensions). About that removing String keyword thing, I think you needed to put a space before String so that vs-code won't remove it. Otherwise, vs-code thinks you are trying to correct the String keyword instead of adding another keyword.
Yup, that makes sense! I guess I wouldn’t be surprised if other editors /IDEs did something similar
I got here after running into problems with Thymeleaf plugins in Spring Boot Suite 4.8 +. VS Code actually works better with Thymeleaf editing.
Thanks a lot for share it, I tried with vscodium but additional configurations are needed, I'm currently use eclipse but after this video I'll give a try to vscode.
Your videos are great!!!
VS code has been pretty awesome for me. I only started learning java this year and it's the one IDE I found both easy to use and download. Still getting a hang of the extensions though
You are amazing as always dear Kaushik :) You rock. Have a great, prosperous and beautiful 2021 :)
Sir please give one series on reactive programming in java. Love the way you teach.
I second this (:
I agree!!
I was already using, but I wasn't using it right. I did not have the right plugins lol. Thanks for great tutorial.
It would be great if you can add a follow up video for this - "how to use maven in VS code"
Thank You sir, Appreciate your Work
Thank You sir , well detailed video
Great video, thanks!
I have been developing Spring Boot and Quarkus applications in Code Server (It is basically VS Code in browser) over a year. I found myself more productive compared to Eclipse. Also I run my Code Server in a more powerful server than my laptop so no fan noise.
Hey Koushik, I am really confused as to how this code worked for you...
(responseCodeCategory != 2 || responseCodeCategory != 3) condition shouldn't work for SITE_IS_DOWN case. It should be set for SITE_IS_UP case. I did this code myself. I am not getting how it is working correctly in your video!!!!!!
This is such a good tutorial, thank you.
Thanks this video was great!
I use vc code to view files in formatted way on my mac but didn't realize it has java features as well using extension. I will try to use it for a week to see how do i adapt to it. Thanks for your video
Java code generators plugin will allow to generate code snippets like constructors setters getters tostring etc
Love this video, I'm VS code user for python and C# projects, so this is very helpful to learn that Javal/Spring also works like a charm, thanks so much for this video!
A really nice explanation! Thank you so much for the good content. 🙌
This is saaah-weet! Thanks for making me think this was possible. I'm about to try JakartaEE and I'm going to see if it works in vscode. Maybe, maybe not, but I didn't think spring boot would work this well either.
Very helpful, thank you.
its been almost more than 2 years im using vs code for java
Very informative video, huge thumbs up!!
It also has pretty nifty gui git conflict resolver. Better than what most offer.
Great work! Thank you for this.
Really helpful. I was thinking to buy the Intellij. Now changed my mind ;) Thank you!
Great video. At last started working on Java. I have to install javacodingpack also to make it work
Awesome content. Please keep making VS Code Java related videos
Second coz everyone is 1st
Funnily enough, you're actually first :)
thanks, i was using Eclipse, but... vscode looks so much better, i will try it!
The dragon drop actually works, but not under the "JAVA PROJECTS" representation. Switch to "IS-THE-SITE-UP" and you can move the files around as you want.
this is great bro, thank you
Isn't line 27 should be responseCodeCategory !=2 && responseCodeCategory !=3 ?
Really helpful tutorial. I think in #27 logical operator should be "&&" (AND) insted of "||" (OR)
excellent video thank you very much! like and new subscriber
Using VSCode with flutter, javascript, typescript, java, python, Platformio.... It is a great text editor ...
I saw this video before it works, please show how to run multiple spring boot application simultaneously
Thanks Java Brains you are the Man
Thank you for being such a valuable content provider. Well done! After writing this, I went for the like button, and saw I am subscribed. Which is good! Let me use the chance to tell you that the way you say the truth you say at 12:32 made me LOL :D.
I have a worst experience with vsCode when it comes to java projects.
I used it for my spring boot project and it worked perfectly fine initially, i mean test cases were running smoothly and had no problem with debug mode or setting up dependencies. In fact I loved full screen view and fonts.
But after 2-3 days man-o-man intelliSense stopped working, no matter how hard I try it wil stop on loading and when I checked my cpu usage it was skyrocketed (a process from Java extension pack was culprit). I tried with same setup again but same problem.
Soon I moved to intelliJ. 😅
Hi, thanks for the video. I am trying to run the same project only using groovy and when running it gives the error "Failed to run this project 'demo' because it does not contain any main class.". You don't know how to fix it?
This is good. Are you sure about ORing
(responseCodeCategory != 2 || responseCodeCategory != 3)
An extension recommendation if you want the code quality suggestions: SonarLint. It even does the replacement of code for you, just like IntelliJ would
thank you so much...very helpfull
The command palette can also be opened with F1. Really good video.
Nice | Simple | Clear.
Thank you sir 😃
Great video. Thanks.
Super. Really liked the practical approach. Could you also do a separate video on Testing feature (JUnit..etc.,) ?
Very nice presentation. Thanks for your time.
Great tutorial, thank you.
I see "Site is down" all the time and this is due to line # 29. if (responseCode !=2 || responseCode!=3) always evaluates to true even when responseCode is 2.
If you change the if statement to && instad of || it will work, also changeing the statements from != to == will work but this will require flipping the up and down statements as well.
Yes!
How the heck did it work for him?? I was getting same error changed to ==
Hi Koushik - wonderful effort. I was about to explore VS Code and I happened to see this. Will use it for a while. So far so good.
Can I ask an unrelated question. What is your view on JHipster especially - JHipsterLight. Please share feedback if any. Thank you.