REST API Documentation using Swagger2 in Spring Boot | Tech Primers

  Рет қаралды 167,250

Tech Primers

Tech Primers

Күн бұрын

Пікірлер: 178
@rohitkr.maurya6917
@rohitkr.maurya6917 5 жыл бұрын
Your video is like any beginner can easily understand....Thanks for your effort
@ItamarLev
@ItamarLev 6 жыл бұрын
great tutorial! after days and days of looking for a good explanation you did it in less than half an hour. thank you!
@TechPrimers
@TechPrimers 6 жыл бұрын
Cheers mate
@sateeshkumar-sy2pc
@sateeshkumar-sy2pc 6 жыл бұрын
Explained in a very simple way. Tried once and executed. That's all.... Thank you...
@muks
@muks 6 жыл бұрын
Dude, Few points 1. The background is really awesome, 2. I really learned some good stuff although I know swagger2, 3. You need to explain in the swaggerConfig what is regex and how did you coded for it? because default paths only accepts the PathSelectors, 4. Some of the attributes have changed For e.g. description for @Api OR ApiInfo constructor args have changed but i guess you are unable to update the videos which is understood considering the vast no. of videos you are making, 5. Hands down very good videos for anybody to keep learning. Thanks a lot.
@muzammilsiddique2821
@muzammilsiddique2821 6 жыл бұрын
This session is a great learning guide for generating API documentation from Spring boot project. Please plan a session on building API documentation from swagger editor and then build an API based on that documentation
@andrzejokon1517
@andrzejokon1517 6 жыл бұрын
I use all technologies you talk about in your videos:) Great tutorial. Thank you.
@TechPrimers
@TechPrimers 6 жыл бұрын
+The Hedgo thanks dudr
@maxlimgj
@maxlimgj 5 жыл бұрын
Awesome explaination! Looking forward to more content
@suddewar
@suddewar 5 жыл бұрын
Explained in very clean and precise way. Thanks
@dakshu11
@dakshu11 3 жыл бұрын
Thanks for the tutorial, my rest api just accepts query parameter i.e ?param = value, so I don't want swagger to ask for any parameters, how can I do that.. Plz help
@anilpatil5882
@anilpatil5882 6 жыл бұрын
please upload videos which contains spring boot and jpa integration with curd/crud operation
@TechPrimers
@TechPrimers 6 жыл бұрын
Hi Anil, take a look at the spring boot Playlist. I have done it with Spring Data JPA examples
@kev18284
@kev18284 5 жыл бұрын
Very clean and precise tutorial!
@jribkr8501
@jribkr8501 6 жыл бұрын
I would appreciate if I can get answers to the following questions: Why do you use Springfox? What would I have to do if I want to use core swagger libraries? How does it work at a higher level? Somehow everyone is eager to use Springfox. Is there a specific path where swagger docs would be generated? Is there a way to customize the path where you want to generate the doc?
@ILyaCyclone
@ILyaCyclone 6 жыл бұрын
You've added 200 "Successful Hello World" at 18:13, but why it isn't in the doc at 18:52?
@78tomke
@78tomke 6 жыл бұрын
Thanks, mate. It was a pleasure to watch it. Excellent job very informative ;)
@VIGNESHRUpendiran
@VIGNESHRUpendiran 7 жыл бұрын
Wow,you again proveed buddy,i learned new things from u...I gave u thumpsup..Keep rocking...
@TechPrimers
@TechPrimers 7 жыл бұрын
+VIGNESH R thank you Vignesh. Happy Learning
@photo_lab4095
@photo_lab4095 7 жыл бұрын
Great Tech Primers good job please make more video on Rest Webservices with Spring Rest WebServices
@TechPrimers
@TechPrimers 7 жыл бұрын
sure ramjeet. any specific usecase you want me to cover?
@photo_lab4095
@photo_lab4095 7 жыл бұрын
Recently I attend one interview he asked me to represet the EntityEndPoint in Rest API but I didn't get the question it self so I want to learn besic Rest Full or Spring Rest webservice with example. & Thanks for response.
@TechPrimers
@TechPrimers 7 жыл бұрын
EntityEndPoint is the Endpoint exposing your entity(eg Users).
@invisibler3
@invisibler3 2 жыл бұрын
simple and nice explanation step by step
@gundamaiahannamaina9273
@gundamaiahannamaina9273 6 жыл бұрын
Nice tutorial. Instead of placing annotations in resource classes. We can create interface and place all api annotations on top of the methods in interface And implement that interface in the resource. Is this a good way of implementating swagger in separate interfaces ?
@chhagansahu8920
@chhagansahu8920 4 жыл бұрын
Great tutorial, thanks !! How can we pass custom header through the Swagger. Is it possible?
@nikhilnr6392
@nikhilnr6392 6 жыл бұрын
Great video !! very informative !! One quick question - I am working on adding Swagger documentation on REST Services developed by somebody else. This REST API does not have @RequestBody annotation for the Request object. When I add @RequestBody to the Request API, the API is breaking. Therefore, how can I include the REQUEST PARAMETERS in the Swagger documentation without adding @RequestBody ?
@harishpavant
@harishpavant 2 жыл бұрын
I am using Jersey with spring boot, I think I am getting error : bean creation failed. Do I have to do anything diffrent in this scenario. Thanks!
@StefanBanu
@StefanBanu 7 жыл бұрын
Hi, what plugin was that automatic import in pom.xml when you just typed swaggerDependency? Or what was that?how can i type directly the name of the dependency in pom.xml? thank you,
@EnterpriseArchitect01
@EnterpriseArchitect01 5 жыл бұрын
I'am looking out to create Microservices documentation very similar to 'Rapid API ' i,e with get/post methods, Resource URI and testing approach with API key . Any idea, how to create such documentation ? Thanks in Advance
@ramstube08
@ramstube08 5 жыл бұрын
It's very detailed and very good. Thanks much for the video. Can you please tell me how to hit that request URL with a java program. If you can guide me to any other resource is also good..
@TechPrimers
@TechPrimers 5 жыл бұрын
you can try googling for RestTemplate. using rest template you can hit the urls programmatically
@SurendraJayswal
@SurendraJayswal 5 жыл бұрын
hi, I need to create a dropdown and based on selected value, show a different table of data. can you help?
@parasbishwakarma5737
@parasbishwakarma5737 6 жыл бұрын
Great Video .. I have one question that is if the application is using security like spring security then how the swagger authorize users. Please Suggest.
@TechPrimers
@TechPrimers 6 жыл бұрын
Swagger will internally use the secured API, so it still will use Spring Security and you wil have to set headers in the browser using REST clients
@Vihaanhyperboy200
@Vihaanhyperboy200 5 жыл бұрын
Another awesome video from TechPrimers. Thank you. We have implemented our REST services with OAUTH2. How to test those services from Swagger UI. I could not find much resources on it.
@TechPrimers
@TechPrimers 5 жыл бұрын
Swagger UI is just for getting documentation out of the exposed REST endpoints. you can use CURL to trigger REST calls for automated testing.
@vishalthirumoorthy
@vishalthirumoorthy 5 жыл бұрын
This is a great video....I also have a question here.... Can I configure my code so that it will also general Yaml file for the swagger,.... I'll use that YAML in the swagger hub and can give it to the testing team while my application runs in the cloud...
@ManishKumar-lg9gt
@ManishKumar-lg9gt 2 жыл бұрын
Hi Vishal, I have the same requirement. Can you tell me, did you find any solution for this?
@aneksingh4496
@aneksingh4496 5 жыл бұрын
Nicely explained ....can u please make videos on Rx spring
@nishkarshjain5684
@nishkarshjain5684 2 жыл бұрын
Bro i did the same as u suggest but the swagger ui dashboard is not opening , its showing 403 status?? Anyone plz help??? 👆🏻
@zishan-khan
@zishan-khan 4 жыл бұрын
hi, how can we send jwt token with the help of swagger for authentication?
@nitsbobby
@nitsbobby 6 жыл бұрын
Good Video and very easy to understand. Thanks for this tutorial. Thanks Bro.
@krishnamr6608
@krishnamr6608 6 жыл бұрын
Great Video. Simple and good. Keep doing.
@balakajendran1
@balakajendran1 5 жыл бұрын
I was downloaded source from github and imported as maven project in STS tool. The Swagger UI page loading but Rest API details not shown. Can you please help me to resolve this issue.. Anything I have to do specifically for STS tool?
@praveenambati7804
@praveenambati7804 5 жыл бұрын
facing same issue, have you fixed it already ?
@balakajendran1
@balakajendran1 5 жыл бұрын
@@praveenambati7804 Download github code from this video and try it.
@praveenambati7804
@praveenambati7804 5 жыл бұрын
@@balakajendran1 Thank You for your reply, I found another way to work on Swagger2. it's working now.
@praveenambati7804
@praveenambati7804 5 жыл бұрын
localhost:8889/swagger-ui.html# doesn't showing any resource ..verified basepackage in SwaggerConfig seems fine according to my package names. can you please help how to fix this issue ? FYI, I followed same example
@GauravSharma-wb9se
@GauravSharma-wb9se 4 жыл бұрын
how user will know request structure ?....can't it show sample request structure ?
@TechPrimers
@TechPrimers 4 жыл бұрын
Yes it does show. When you click on each endpoint it shows the structure
@mahendram6850
@mahendram6850 3 жыл бұрын
Hi TechPrimers, I followed the same steps but when I try to access localhost:8080/swagger-ui.html it says 404 error. Any idea?
@Almost2333
@Almost2333 6 жыл бұрын
Enter swaggerConfig and the autofill. Is Plugin? I installed Swagger Plugin from IDEA, but it is invalid. English is not my native language; please excuse typing errors.
@TechPrimers
@TechPrimers 6 жыл бұрын
its called Live Template. I have added those texts before hand so that it can paste the code wherever i need
@Almost2333
@Almost2333 6 жыл бұрын
Thanks :)
@araran5610
@araran5610 2 жыл бұрын
If you have such error : Failed to start bean 'documentationPluginsBootstrapper' try to insert this in your application.properties : spring.mvc.pathmatch.matching-strategy=ant-path-matcher
@Premkumar-ln7gt
@Premkumar-ln7gt 5 жыл бұрын
simple and easy....thanks sir ji..
@photo_lab4095
@photo_lab4095 5 жыл бұрын
how we can add swagger ui authentication with out any credential please make one videos on this topic
@yogeshchaudhari9971
@yogeshchaudhari9971 6 жыл бұрын
amazing knowledgeable video... thank you so much
@abinashdas5222
@abinashdas5222 5 жыл бұрын
How do we disable tryout and authorize options in the swagger ui?
@nayanrajvansh6705
@nayanrajvansh6705 4 жыл бұрын
I tried using @ApiModelProperty for the complex objects in the response but it is working only for those objects which are coming as response in the form of a list but not in case of a standalone object. In the below example "List of ObejctA" is documented is Swagger but "Stand alone Object B" is not getting documented. e.g. @ApiModelProperty(notes="List of ObjectA") public List getObjectA() {. . . } @ApiModelProperty(notes="Stand alone Object B") public ObjectB getObjectB() {.......} What to do ?
@bhubannayak6155
@bhubannayak6155 5 жыл бұрын
Hi very informative video but can I have multiple registration of rest applications in one swagger UI ?
@TechPrimers
@TechPrimers 5 жыл бұрын
at this point you cannot
@TechPrimers
@TechPrimers 5 жыл бұрын
you have to leverage on API Gateways like APIGee
@sathishrao7926
@sathishrao7926 5 жыл бұрын
Quite a comprehensive information through good explanation..
@mosabkamal
@mosabkamal 4 жыл бұрын
nice and it's very clear video, Thanks a lot :-)
@Rishi_Ventrapati
@Rishi_Ventrapati 6 жыл бұрын
Good information for beginners. Grate video
@asmatsoomro7675
@asmatsoomro7675 5 жыл бұрын
Hey the video was very helpful. I have one question though. How can we generate a yaml file from a swagger UI for your API?
@amberkumar2359
@amberkumar2359 6 жыл бұрын
Can you please suggest a way to access LDAP secured api with swagger2?
@nikhilka9584
@nikhilka9584 5 жыл бұрын
Nicely explained. How can we set api headers in swagger ?
@saktiranjanbehera7010
@saktiranjanbehera7010 5 жыл бұрын
I am not able to import regex.Could you help me out.
@gokuldighe9160
@gokuldighe9160 3 жыл бұрын
Thank you ..very informative and detailed one indeed
@busbusvlog
@busbusvlog 5 жыл бұрын
Thank you for the video. It helped me a lot :)
@TheShantanu30
@TheShantanu30 4 жыл бұрын
How to send excel in response using swagger and springboot?
@TechPrimers
@TechPrimers 4 жыл бұрын
You have to send the right headers for attachment of your csv from spring boot
@TheShantanu30
@TheShantanu30 4 жыл бұрын
@@TechPrimers Thanks a lot for your reply. But the thing is what should be the typreof ResponseEntity, Will it be InputStream? If so, then how can I define InputStream in the swagger json?
@anushaanu9619
@anushaanu9619 6 жыл бұрын
I have followed all steps,but I'm getting whitelable error,in chrome,and 404 error in console,please answer this,I'm new to spring boot
@ILyaCyclone
@ILyaCyclone 6 жыл бұрын
This is Spring Boot 1.5.6 video and it is 2.1.* nowadays - a lot could change, e.g. URL of the UI. Check official docs.
@kodosaru
@kodosaru 5 жыл бұрын
Nice tutorial. Thank you!
@kunupat
@kunupat 5 жыл бұрын
Good video. I have a question: if we have a set of REST microservices each running as a separate Spring boot app ( a maven project running inside docker) and if we have enabled swagger docs for each of the service, is there any way to consolidate swagger documentation of all services under one swagger UI URL?
@TechPrimers
@TechPrimers 5 жыл бұрын
nope. none yet.
@mohamedgoher9727
@mohamedgoher9727 6 жыл бұрын
The video is neat and untidy
@sayitlikeitis1202
@sayitlikeitis1202 6 жыл бұрын
Good videos from this company. Excepting that the BACKGROUND MUSIC is extremely ANNOYING !!! . Tell me is there any other website that explains concepts with movie like background ?
@irshadb6587
@irshadb6587 7 жыл бұрын
There is another option of writing the swagger yml file and generate the code from it. Could you elaborate on that too? Thanks
@TechPrimers
@TechPrimers 7 жыл бұрын
sure will do
@fsocietyearth9091
@fsocietyearth9091 5 жыл бұрын
Just wondering, if you are coding and documenting both by yourself, then what tech writers are doing in your company?? I think this is part of tech writers
@Gabs__00
@Gabs__00 7 жыл бұрын
Thank you so much from Brazil, your video help me a lot of
@TechPrimers
@TechPrimers 7 жыл бұрын
+Gabriel Tavares my pleasure Gabriel
@ccccljk
@ccccljk 6 жыл бұрын
i can't run app in source code in eclipse, please help me
@balrajmys
@balrajmys 7 жыл бұрын
Awesome video :) great job :) very informative
@neekhilverma9560
@neekhilverma9560 6 жыл бұрын
Sir, Please show a example for the integration of swagger and mongoDB in spring framework
@TechPrimers
@TechPrimers 6 жыл бұрын
i have separate video on mongo. you can merge them both
@neekhilverma9560
@neekhilverma9560 6 жыл бұрын
@@TechPrimers ok sir I will try to merge them . Thank you 😊
@vipinahuja6096
@vipinahuja6096 7 жыл бұрын
Nice video :) .. I have one question -> Can I catch response from swagger and use in my java code. e.g: if I receive successful response Swagger should show some message and give me link do u want to go next request. Thanks in advance :) .
@TechPrimers
@TechPrimers 7 жыл бұрын
HI Vipin, Swagger is used only as a documentation tool, we should not use it for controlling workflow using UI. You can get the response and use it in java code, but showing message and giving link for going to next request is an overkill.
@vipinahuja6096
@vipinahuja6096 7 жыл бұрын
+Tech Primers thanks a lot for reply. Got it
@chrispie5
@chrispie5 6 жыл бұрын
@@vipinahuja6096 I think what you looking for is a rest concept called hateoas. Whereby the rest service is giving you a response of the next available options
@vijaykumar-gq7bm
@vijaykumar-gq7bm 3 жыл бұрын
@Tech Primers Please Explain how to Solve This Problem...I Tried So Many Solutions From Google,Stackoverflow etc But Still Error Not Fixed... Can You Please Respond Bro Caused by: java.lang.NullPointerException: Cannot invoke "org.springframework.web.servlet.mvc.condition.PatternsRequestCondition.toString()" because the return value of "springfox.documentation.spi.service.contexts.Orderings.patternsCondition(springfox.documentation.RequestHandler)" is null at springfox.documentation.spi.service.contexts.Orderings$8.compare(Orderings.java:112) ~[springfox-spi-2.6.1.jar:null]
@gururaj030
@gururaj030 5 жыл бұрын
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2019-10-23 23:11:22.558 ERROR 8166 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : *************************** APPLICATION FAILED TO START *************************** Description: An attempt was made to call a method that does not exist. The attempt was made from the following location: springfox.documentation.spring.web.readers.parameter.ParameterDataTypeReader.apply(ParameterDataTypeReader.java:90) The following method did not exist: springfox.documentation.spi.schema.contexts.ModelContext.inputParam(Ljava/lang/reflect/Type;Lspringfox/documentation/spi/DocumentationType;Lspringfox/documentation/spi/schema/AlternateTypeProvider;Lspringfox/documentation/spi/schema/GenericTypeNamingStrategy;Lcom/google/common/collect/ImmutableSet;)Lspringfox/documentation/spi/schema/contexts/ModelContext; The method's class, springfox.documentation.spi.schema.contexts.ModelContext, is available from the following locations: jar:file:/Users/gb047137/.m2/repository/io/springfox/springfox-spi/2.8.0/springfox-spi-2.8.0.jar!/springfox/documentation/spi/schema/contexts/ModelContext.class It was loaded from the following location: file:/Users/gb047137/.m2/repository/io/springfox/springfox-spi/2.8.0/springfox-spi-2.8.0.jar Action: Correct the classpath of your application so that it contains a single, compatible version of springfox.documentation.spi.schema.contexts.ModelContext
@chinmaykrovvidi8519
@chinmaykrovvidi8519 6 жыл бұрын
So you cannot override 200 Message ?
@gmsvgm
@gmsvgm 6 жыл бұрын
We need to develop multiple micro services and so wanted to know if we can have separate swagger ui where documentation of all these micro services can be obtained in single shot. Please respond asap
@TechPrimers
@TechPrimers 6 жыл бұрын
you cannot do that for all microservices in one place. It can be done only at individual service level
@gmsvgm
@gmsvgm 6 жыл бұрын
Tech Primers ok Can I read the swagger json from all my services and call it from a single place??
@balakrishnagajam
@balakrishnagajam 5 жыл бұрын
Great job dude
@vbnandu867
@vbnandu867 6 жыл бұрын
what about the response model?
@vndprasadgrandhi7024
@vndprasadgrandhi7024 2 жыл бұрын
Excellent..thanks
@RISHABHJAIN4
@RISHABHJAIN4 6 жыл бұрын
Can I get this documentation offline, i.e, when my service is not running then also one could read the Docs ??
@TechPrimers
@TechPrimers 6 жыл бұрын
you will have to host it somewhere or the other. At max, you can download the html page.
@isidronavea7363
@isidronavea7363 5 жыл бұрын
Nice tutorial!
@sathishkumar-qf6xb
@sathishkumar-qf6xb 6 жыл бұрын
Thanks dude .very informative
@nirvanjain3021
@nirvanjain3021 5 жыл бұрын
Liked Video Use something different every time other than Hello World It confuses first timers
@AbhishekSagar-kf8fy
@AbhishekSagar-kf8fy 7 жыл бұрын
Awesome can you please make on video on debugging microservices examale
@TechPrimers
@TechPrimers 7 жыл бұрын
+Abhishek Sagar Sure
@subash961
@subash961 7 жыл бұрын
I have question, Can i use swagger2 for spring MVC also? or only support spring boot?
@vidyasagarareddy6118
@vidyasagarareddy6118 5 жыл бұрын
@Tech primers, How are you getting the license for free the Intellij, I can see on their site, it is very costly.
@TechPrimers
@TechPrimers 5 жыл бұрын
Use Community edition. It's free
@nitheshp6566
@nitheshp6566 5 жыл бұрын
getting error regex method in product api method
@rohitkolar5076
@rohitkolar5076 6 жыл бұрын
what is the name of that sound you are playing in intro
@TechPrimers
@TechPrimers 6 жыл бұрын
Its from Joakim Karud
@vikashyadav-nr4my
@vikashyadav-nr4my 6 жыл бұрын
Thank you very much for this video..could you pls add video on how to add headers in swagger as well.Thanks
@TechPrimers
@TechPrimers 6 жыл бұрын
sure Vikash. Will do
@chakkaravarthik
@chakkaravarthik 5 жыл бұрын
@@TechPrimers That would be great!
@shivampatil5709
@shivampatil5709 5 жыл бұрын
video is good as well as backgroung score.
@poojas6172
@poojas6172 4 жыл бұрын
the video explaination is very good but the background sound is very annoying. Its not needed . Thanks
@TechPrimers
@TechPrimers 4 жыл бұрын
Removed them un latest videos pooja
@dssomething8516
@dssomething8516 6 жыл бұрын
How we can deploy war file into tomcat. Make a video for it.
@TechPrimers
@TechPrimers 6 жыл бұрын
HI DS, there are lots of good videos in KZbin already for that
@dssomething8516
@dssomething8516 6 жыл бұрын
Tech Primers thanks for reply I have faced a issue that is resolved :)
@vipinsamleti8294
@vipinsamleti8294 7 жыл бұрын
Where is the swagger-ui.html file will store? Can we customize swagger-ui.html ?
@TechPrimers
@TechPrimers 7 жыл бұрын
+Vipin Samleti hi Vipin, it's generated under the sources. You can use the relevant annotations to modify it
@vipinsamleti8294
@vipinsamleti8294 7 жыл бұрын
+Tech Primers, I have searched in my workspace under webapp folder, there is no any file generated. should we write any annotation to generate the file?
@TechPrimers
@TechPrimers 7 жыл бұрын
+Vipin Samleti it should be in your target folder
@GlebKuzntesov
@GlebKuzntesov 6 жыл бұрын
Great video!
@sun-prairie
@sun-prairie 7 жыл бұрын
Very useful. Thank you!
@TechPrimers
@TechPrimers 7 жыл бұрын
+ennore82 glad that was useful
@virtexamit
@virtexamit 7 жыл бұрын
Nice work !!
@shareefhiasat9746
@shareefhiasat9746 4 жыл бұрын
Cool, just one note in io.swagger.annotations /** * Not used in 1.5.X, kept for legacy support. * * @return a longer description about this API, no longer used. */ @Deprecated String description() default "";
@srinusrinivas6101
@srinusrinivas6101 5 жыл бұрын
Thankyou helped me a lot
@gopalbarge4961
@gopalbarge4961 7 жыл бұрын
Simply awesome
@TechPrimers
@TechPrimers 7 жыл бұрын
+Gopal Barge thanks Gopal
@akhandpratapsingh1527
@akhandpratapsingh1527 6 жыл бұрын
Thanks a lot, Man.
@abhilashsulibela1414
@abhilashsulibela1414 6 жыл бұрын
This is awesome! Thanks (y)
@hectormancilla892
@hectormancilla892 6 жыл бұрын
my space in in blank, ca i show you my code here??
@TechPrimers
@TechPrimers 6 жыл бұрын
yes please
@hectormancilla892
@hectormancilla892 6 жыл бұрын
i´m actually a tri with version 7.0 of the Swagger depencies. -----------------------//extract of my controller class//---------------- @RestController @EnableAutoConfiguration @SpringBootApplication @Api(value = "Read API") public class Example { @Autowired public AlfrescoService alfrescoService; @ResponseBody @RequestMapping(value = "/hello", method = RequestMethod.GET) @ApiOperation(value = "Muestra mensaje", notes = "Retorna mensaje", response = ResponseMessage.class, consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @ApiResponses({ @ApiResponse(code = 200, message = "Documentos obtenidos existosamente.", response = ResponseMessage.class), @ApiResponse(code = 404, message = "No se encontraron documentos.", response = ResponseMessage.class) }) String home() { alfrescoService.obtieneSesion(); return "Hello World!"; } @ApiOperation(value = "Search Student by studentId") @RequestMapping(value = "/", method = RequestMethod.GET) String manchester() { alfrescoService.obtieneSesion(); return "United"; } -----------------//SwaggerConfig//---------------------- @Configuration @EnableSwagger2 public class SwaggerConfig { @Bean public Docket api() { return new Docket(DocumentationType.SWAGGER_2) .select() .apis(RequestHandlerSelectors.basePackage("Test.Hola")) .paths(PathSelectors.any()) .build(); } } ----------------//main excecution (is in the controller class)//---------------- public static void main(String[] args) throws Exception { SpringApplication.run(Example.class, args); }
@hectormancilla892
@hectormancilla892 6 жыл бұрын
o you can check my Stack Overflow Question for more details. stackoverflow.com/questions/49438908/why-swagger-ui-dont-show-services-in-my-maven-project-on-spring
@TechPrimers
@TechPrimers 6 жыл бұрын
Test.Hola -> is that your package name? I guess you need to provide the correct package in the Swagger config
@hectormancilla892
@hectormancilla892 6 жыл бұрын
Tech Primers i dont know what happened. I change the class into another new proyect and it works. Thanks for help me
@vishalgaikwad873
@vishalgaikwad873 5 жыл бұрын
SIR i am facing this problem, while running swagger spring boot application ___________________________________________________________________________ *************************** APPLICATION FAILED TO START *************************** Description: An attempt was made to call a method that does not exist. The attempt was made from the following location: springfox.documentation.spring.web.plugins.DocumentationPluginsManager.createContextBuilder(DocumentationPluginsManager.java:152) The following method did not exist: org.springframework.plugin.core.PluginRegistry.getPluginFor(Ljava/lang/Object;Lorg/springframework/plugin/core/Plugin;)Lorg/springframework/plugin/core/Plugin; The method's class, org.springframework.plugin.core.PluginRegistry, is available from the following locations: jar:file:/C:/Users/vrgaikwad/.m2/repository/org/springframework/plugin/spring-plugin-core/2.0.0.M1/spring-plugin-core-2.0.0.M1.jar!/org/springframework/plugin/core/PluginRegistry.class It was loaded from the following location: file:/C:/Users/vrgaikwad/.m2/repository/org/springframework/plugin/spring-plugin-core/2.0.0.M1/spring-plugin-core-2.0.0.M1.jar Action: Correct the classpath of your application so that it contains a single, compatible version of org.springframework.plugin.core.PluginRegistry
@vishalgaikwad873
@vishalgaikwad873 5 жыл бұрын
have any solution??
@victorlangat856
@victorlangat856 5 жыл бұрын
a wonderful one here
@sudinranjitkar5726
@sudinranjitkar5726 7 жыл бұрын
video on spring MVC too please
@TechPrimers
@TechPrimers 7 жыл бұрын
here it is: kzbin.info/www/bejne/fJ2se6RvfNF_jdE
@sudinranjitkar5726
@sudinranjitkar5726 7 жыл бұрын
No no not this one.. I mean REST API Documentation using Swagger2 in Spring MVC.
@TechPrimers
@TechPrimers 7 жыл бұрын
it's the same process. instead of loading the swagger configs like we did for spring boot, you need to load it via xml. apart from that, others are same.
@sudinranjitkar5726
@sudinranjitkar5726 7 жыл бұрын
Oh now i got it. I was having an error of blank page. The swagger-ui used to load but i get blank page. But finally found the error was in the pom.xml i changed the version of spring-core to 4.3.10.RELEASE and everything works fine. Version older then 4.3 gives an error like blank page..
@TechPrimers
@TechPrimers 7 жыл бұрын
+Sudeen Ranjitkar cool. Thanks for sharing.
@rageshsharma4368
@rageshsharma4368 7 жыл бұрын
Awesome video :)
Actuators in Spring Boot | Tech Primers
17:17
Tech Primers
Рет қаралды 49 М.
Profiles in Spring Boot | Spring Profiles | Tech Primers
14:13
Tech Primers
Рет қаралды 72 М.
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН
How many people are in the changing room? #devil #lilith #funny #shorts
00:39
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 21 МЛН
How to configure Swagger in Spring Boot - Brain Bytes
15:21
Java Brains
Рет қаралды 156 М.
Spring Security using JWT in Spring Boot App | Tech Primers
1:13:04
Tech Primers
Рет қаралды 139 М.
REST API Documentation using Swagger2 in Spring Boot
59:00
Stack Simplify
Рет қаралды 3 М.
spring boot with swagger
31:17
Java Techie
Рет қаралды 42 М.
REST API and OpenAPI: It’s Not an Either/Or Question
9:17
IBM Technology
Рет қаралды 221 М.
Spring Security using OAuth2 in Spring Boot | Tech Primers
1:00:37
Tech Primers
Рет қаралды 264 М.
How to add Swagger to Spring Boot - Brain Bytes
21:09
Java Brains
Рет қаралды 459 М.
Exception Handling in Spring Boot REST API Explained With Demonstration
28:05
Working with Feign | Microservice
11:15
Telusko
Рет қаралды 47 М.
Spring Boot with HTTPS Example | Tech Primers
14:50
Tech Primers
Рет қаралды 83 М.
Quilt Challenge, No Skills, Just Luck#Funnyfamily #Partygames #Funny
00:32
Family Games Media
Рет қаралды 55 МЛН