Spring Swagger UI: what is difference between io.swagger, io.springfox, and com.mangofactory - spring-mvc

I am working on integrating the swagger UI with a spring boot MVC app and I am curious as to the differences between these libraries.
I looked at each on mvnrepository.com and they are all done by different groups but seem to do the same thing. I am hoping to get a clear idea of the differences between these and if one is recommended over the others. I notice the swagger-core module by io.swagger has the most usages.
Thanks!

Here is an explanation of the different libraries.
Springfox is in a sense v2 of the swagger library that used to be packaged as mangofactory. What happened was we transitioned from using a private repo to creating a github organization so support development as a team.
In short mangofactory evolved into springfox which supports 2.0 version of swagger spec (in addition to 1.2). To be clear springfox and its predecessor supports spring mvc.
io.swagger is the mother ship if you will. It has great support for spring and jax-rs. So if you're looking for support for Jax-rs based services using spring or otherwise that's a great option.

io.swagger is the package for swagger libraries and you need separate spring jars to couple it with Spring. This is version 2 of swagger.
io.springfox is Springfox Swagger2, wherein swagger comes integrated with Spring.
com.mangofactory is swagger integrated with Spring Web MVC framework.
To understand differences between Spring Web MVC framework and spring, you can read this:
what is the difference between Spring and Spring MVC framework

Related

How to hack latest Spring Framework for OSGi?

Right now we are developing IHE HL7 Integration Project. Where lots of micro-services and dependencies. It's developed by using Apache Camel 2.18.4, Spring Framework 4.3.10.RELEASE on top of Spring Boot 1.5.6.RELEASE.
It's a combination of Spring Boot Standalone web application, grew larger and unmanageable. Our thought is to make it modularize by the support of OSGi bundle using Blueprint on top of Spring Framework 4.3.10.RELEASE and Spring Boot 1.5.6.RELEASE.
It's would be the best if we are able to hack OSGi bundle with reusable Spring Context, Persistance(JPA, MyBatis) and Transaction.
It's impossible to dive fully into Blueprint instead of Spring Framework. Only want to use the flavor of Blueprint to make our Spring Application modularize, loosely couple and JMX compliance. For example modularize by its:
Bundles for Service
Bundles for Persistence
Bundles for Spring Component
Bundles for Camel Component/Endpoint
Bundles for Utilities/Miscellaneous
In this perspective we expect the right opinion from the expertise what's the feasibility of our thought. Guideline and reference highly expected.

Struts migration to Spring MVC - via Spring Boot

We are in the initial stages of converting a Struts 1.2.9 application to Spring MVC. While the impact has been analyzed and well documented and understood for this migration, we are uncertain if we should introduce Spring Boot in this equation.
I have been reading other threads and would like to state that we are not looking to integrate Struts with Spring - rather we are for sure migrating and moving out of Struts to Spring MVC.
Given this background, invite suggestions/thoughts around below:
Benefit of introducing Spring Boot in this process is more of a distant one of an eventual move to Cloud. As such the team has completed the initial configuration required for a Spring application (like web.xml, required jars, spring-servlet.xml) and not sure of immediate benefits for us.
In case we decide to use Spring Boot in this process, we perceive the impact to be:
i. Add spring-boot-starter-web to our gradle build.
ii. Create a starter Application class
iii. Revisit configurations in web.xml like startup servlets using 'SpringBootServletInitializer'
iv. Continue to use a war based traditional deployment using gradle war plugin. Does this package the spring based libraries into the war or should the libraries be on the server classpath?
I welcome thoughts/suggestions/rejections of this as an approach itself :).

How can I add webflow using Spring Boot and Thymeleaf?

I have written a Spring web app for baseball umpires using Spring Boot and Thymeleaf. I like Spring Boot because it resolves dependency w/o a lot of configuration. Now I want to add Sprng WebFlow so umpires can order uniforms, a typical "shopping cart" application. There are many examples on the web but none using Spring Boot. They all are the traditional xml config with jsp and jstl. Has anyone used Spring Boot and WebFlow? There are WebFlow examples on the official Spring web site but very complicated. Thanks Rob
Spring Roo 2.0.0.M3 generates Spring Boot applications and integrates Spring Web Flow easier than ever.
The reference guide includes detailed descriptions of all the features, plus an extensive user guide for main use cases.

Spring MVC or Spring Boot [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 6 years ago.
Improve this question
For a large company (web) project, do you recommend using Spring MVC or Spring-Boot?
Spring-Boot, in terms of configuration, is very easy compared to Spring MVC.
I wonder if I use Spring-Boot can have the same advantages of Spring MVC?
What do you recommend?
My personal advice is to definitely use Spring Boot for many reasons.
The first is that Boot is the "future of Spring". That means that with Boot
you can benefit from many commitments of the Spring community. Most of the
Spring projects today are completely
integrated with Boot, even the community starts to develop many
applications based on Boot. For example for managing and monitoring.
I can suggest to see Spring Boot Admin
With Spring Boot you can benefit from very nice and useful features such as
actuator and remote shell for managing and monitoring, that
improves your application with production ready features that are very
useful.
Very nice and powerful properties and configuration controls - you
can configure your application with application.properties/yml
and extend the boot in a very simple and impressive way, even the
management in terms of overriding is very powerful.
It is one of the first micro-service ready platforms, and in my opinion
nowadays it is the best! Even if you don't build a micro-service
project with boot you can benefit of using a modern approach in which
you have a auto-consistent jar that can benefit from all the features
that I described above or if you prefer you can impose the packaging
as a classical war and deploy your war in any of the containers that
you want.
Use of an intelligent and convention over configuration approach that
reduces the startup and configuration phase of your
project significantly. In fact you have a set of starter Maven or Gradle dependencies
that simplify the dependency management. Then with the
auto-configuration characteristic you can benefit from a lot of
standard configurations, that are introduced through the Conditional Configuration framework
in Spring 4. You can override it with your specific
configurations just defining your bean according with the
convention that you can see in the auto-configure JAR of the Boot
dependency. Remember that Spring is open-source and you can see the code. Also the documentation in my opinion is good.
Spring initializer is a cool tool attainable at this link:
https://start.spring.io/ is a very cool tool just to create your project in a very fast way.
I hope that this reflection can help you decide what is the best solution.
Spring Boot uses Spring MVC! It's just autoconfigured and ready to use when you import the spring-boot-starter-web jar. So you'd basically are talking about whether to use Spring Boot or manually setup your Spring Application...
You can definitely go for Spring Boot. We have already started using Spring Boot for building enterprise application. It has lot of advantages, listing few below here:
Your project configuration will be pretty simple. No need to maintain XML file, all you need to know is how efficiently you can use application.properties file.
Gives lot of default implementation, for instance if you need to send an email, it provides default implementation of JavaMailSender
Spring Hibernate and JPA integration will be pretty simple.
Like this there are many, you can explore based on your needs.
You can use Spring MVC with spring boot as #kryger said, they are non exclusive between them, and the configuration will be easier, also I recommend you to use http://www.thymeleaf.org/ which is template framework. Working with that is like working with JSP but thymeleaf integrates seamlessly with HTML, so your code will look very clean and you can add a lot of useful features.
I think Spring Boot is more useful than the MVC, as it has many advantages and inbuilt features which make it more reliable than MVC. In Spring Boot most of the things are auto configured and there is no need of writing those xml as we do in the MVC, which can save time.
Spring Boot bundles a war file with server run-time like Tomcat. This allows easy distribution and deployment of web applications. As the industry is moving towards container based deployments, Spring Boot is useful in this context as well.
Spring MVC is web application framework. While you can do everything in Spring without Spring Boot, but Spring Boot helps you get things done faster.
Spring boot simplifies your Spring dependencies, no more version collisions,
can be run straight from a command line without an application container,
build more with less code - no need for XML, not even web.xml, auto-configuration, useful tools for running in production, database initialization, environment specific config files, collecting metrics.
Basics of Spring Boot can be found here

Spring MVC portlet IBM WPS

In my job there was a debate about using Spring MVC portlet with IBM WPS, and architect is insisting it is have problem to use it without providing any reference, anyone have any input in this discussion based on actual experience, or any reference talking about issue of using Spring MVC portlet with IBM WPS, or have any reference can I use to show comparison of using Spring MVC portlet or other frameworks?
The standard Spring portlet MVC portlets work well. However they don't offer the fancy components offered by JSF frameworks.
Check out the spring documentation for getting started. You can check the outdated pet portal, not sure if it is working with 3.2 though.

Resources