rest service with intellij - stony brook universitycse336/slides/rest service with intellij.pdf ·...
TRANSCRIPT
![Page 1: Rest Service with Intellij - Stony Brook Universitycse336/Slides/Rest Service with Intellij.pdf · Click next and give a Project Name Make sure that your project structure is looks](https://reader033.vdocument.in/reader033/viewer/2022041507/5e25a4fc23eccf4bd10192bd/html5/thumbnails/1.jpg)
Rest Service with Intellij
![Page 2: Rest Service with Intellij - Stony Brook Universitycse336/Slides/Rest Service with Intellij.pdf · Click next and give a Project Name Make sure that your project structure is looks](https://reader033.vdocument.in/reader033/viewer/2022041507/5e25a4fc23eccf4bd10192bd/html5/thumbnails/2.jpg)
Overview
● Download IntellIj and run as Administrator● Setup Server● Create Project● Create Artifact● Check Artifact to server● Add Java Code● Compile
![Page 3: Rest Service with Intellij - Stony Brook Universitycse336/Slides/Rest Service with Intellij.pdf · Click next and give a Project Name Make sure that your project structure is looks](https://reader033.vdocument.in/reader033/viewer/2022041507/5e25a4fc23eccf4bd10192bd/html5/thumbnails/3.jpg)
Add ServerDownload Glass Fish Server if your IntellIj is not providing oneGo to File → Settings -> Application server.
![Page 4: Rest Service with Intellij - Stony Brook Universitycse336/Slides/Rest Service with Intellij.pdf · Click next and give a Project Name Make sure that your project structure is looks](https://reader033.vdocument.in/reader033/viewer/2022041507/5e25a4fc23eccf4bd10192bd/html5/thumbnails/4.jpg)
Create ProjectGo to File - > Project -> Java EE.
Select RestFul WebService and Web Application
Choose Glassfish server
Download any libraries if it is suggesting
![Page 5: Rest Service with Intellij - Stony Brook Universitycse336/Slides/Rest Service with Intellij.pdf · Click next and give a Project Name Make sure that your project structure is looks](https://reader033.vdocument.in/reader033/viewer/2022041507/5e25a4fc23eccf4bd10192bd/html5/thumbnails/5.jpg)
![Page 6: Rest Service with Intellij - Stony Brook Universitycse336/Slides/Rest Service with Intellij.pdf · Click next and give a Project Name Make sure that your project structure is looks](https://reader033.vdocument.in/reader033/viewer/2022041507/5e25a4fc23eccf4bd10192bd/html5/thumbnails/6.jpg)
![Page 7: Rest Service with Intellij - Stony Brook Universitycse336/Slides/Rest Service with Intellij.pdf · Click next and give a Project Name Make sure that your project structure is looks](https://reader033.vdocument.in/reader033/viewer/2022041507/5e25a4fc23eccf4bd10192bd/html5/thumbnails/7.jpg)
● Click next and give a Project Name● Make sure that your project structure is looks
same as in the next slide. Create the files in src folder
![Page 8: Rest Service with Intellij - Stony Brook Universitycse336/Slides/Rest Service with Intellij.pdf · Click next and give a Project Name Make sure that your project structure is looks](https://reader033.vdocument.in/reader033/viewer/2022041507/5e25a4fc23eccf4bd10192bd/html5/thumbnails/8.jpg)
![Page 9: Rest Service with Intellij - Stony Brook Universitycse336/Slides/Rest Service with Intellij.pdf · Click next and give a Project Name Make sure that your project structure is looks](https://reader033.vdocument.in/reader033/viewer/2022041507/5e25a4fc23eccf4bd10192bd/html5/thumbnails/9.jpg)
Create Artifact ( ctrl+ shift+ alt+ S)
![Page 10: Rest Service with Intellij - Stony Brook Universitycse336/Slides/Rest Service with Intellij.pdf · Click next and give a Project Name Make sure that your project structure is looks](https://reader033.vdocument.in/reader033/viewer/2022041507/5e25a4fc23eccf4bd10192bd/html5/thumbnails/10.jpg)
Add the following helloworld Code in src
![Page 11: Rest Service with Intellij - Stony Brook Universitycse336/Slides/Rest Service with Intellij.pdf · Click next and give a Project Name Make sure that your project structure is looks](https://reader033.vdocument.in/reader033/viewer/2022041507/5e25a4fc23eccf4bd10192bd/html5/thumbnails/11.jpg)
Add the following MyApplication Code in src
![Page 12: Rest Service with Intellij - Stony Brook Universitycse336/Slides/Rest Service with Intellij.pdf · Click next and give a Project Name Make sure that your project structure is looks](https://reader033.vdocument.in/reader033/viewer/2022041507/5e25a4fc23eccf4bd10192bd/html5/thumbnails/12.jpg)
Server Configuration
● Go to Edit Configuration in GlassFish 4.1.1 Drop down(at the top)● Make sure that the URL contains the correct war name provided in the
previous step● Add the end point mentioned in helloword.java
![Page 13: Rest Service with Intellij - Stony Brook Universitycse336/Slides/Rest Service with Intellij.pdf · Click next and give a Project Name Make sure that your project structure is looks](https://reader033.vdocument.in/reader033/viewer/2022041507/5e25a4fc23eccf4bd10192bd/html5/thumbnails/13.jpg)
●
![Page 14: Rest Service with Intellij - Stony Brook Universitycse336/Slides/Rest Service with Intellij.pdf · Click next and give a Project Name Make sure that your project structure is looks](https://reader033.vdocument.in/reader033/viewer/2022041507/5e25a4fc23eccf4bd10192bd/html5/thumbnails/14.jpg)
Start the server