Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
I took a project which I have to use spring boot on it and I know some basic things about Spring but not too much. My question is should I learn Spring completely before start learn Spring boot or should I just start with Spring boot ? Thank you in advance.
As rnside mentioned, spring Boot helps us reducing the boilerplate code for any Spring based application. Some examples are:
It includes the dependencies for various Spring modules like core, web, mvc, etc.
We do not need the XML configuration for Spring when using Spring Boot.
It also includes embedded servers to run the application.
In order to configure anything in the application like DB, mail server, security credentials, etc. , we can do it just by writing it in the application properties file.
You can take a look at http://www.baeldung.com/intro-to-spring-boot if you want to learn how to start working on a Spring Boot app and make a basic application. Meanwhile, if you have any queries for things related to Spring, you can refer to other related links for it:
http://www.baeldung.com/spring-intro
http://www.baeldung.com/properties-with-spring
Some really good videos for this can be found here: https://javabrains.io/topics/spring
Hope that helps.
with only Spring , you can do everything without Spring Boot, Spring Boot helps you get things done faster .
Actually , Spring boot it's a suite of pre configured set of frameworks and technologies to reduce hard configuration providing you the shortest way to have a java webApp .But it still based on Spring , so as mentioned before , you need to know at least the basics of Spring .
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
The community reviewed whether to reopen this question 6 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
Last two years I worked on Spring Boot Applications with Springfox. Springfox generate a documentation and a test ui for your REST API. This was awesome.
But actually Springfox project is dead and do not support the newest Spring. I have three questions
Is there any other way to generate Swagger UI directly? Any other library/project?
How do you implement swagger ui into your Spring Boot project?
I haven't tried it myself yet, but this looks quite promising:
https://github.com/springdoc/springdoc-openapi
OpenAPI 3.0 is the successor of Open API 2.0 (sometimes referred to as Swagger, though that is actually the tooling around Open API).
Not sure how much this project offers in terms of customization and how mature it is, but I guess it's worth a try ;-)
Update:
Since version 3, Spring Fox offers support for Open API 3. Please see the release log for more details.
Spring doc Open API is alternative going forward.
SpringDoc OpenAPI supports OAS 3.0
Supports more annotations like #MatrixParam which was not supported
in springfox.
Spring boot 2.2.x works only with springdoc.
Refer the below link
https://techsparx.com/software-development/openapi/spring-boot-rest-api-docs.html
https://github.com/RabiAPI/Evalon4J
This is a command line tool for generating java restful api documentation
Supported frameworks
Spring MVC
JAX-RS
Swagger 2.0 Annotations
OpenAPI 3.0 Annotations
JSR303 Bean Validation
Now it can export your api to markdown format.
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 4 years ago.
Improve this question
I'm working on a JSF/PrimeFaces web application running on tomcat which uses Spring to inject different services based on the deployment context. I was looking at migrating it to JSF 2.3 when I realized JSF 2.3 requires a CDI container yet Spring doesn't implement the full CDI specification and from what I've read, are not going to do so any time soon.
So my question is two folds:
1) how are people out there dealing with this? I've read there might be some workaround to bridge the CDI with Spring? But which bridging solution would you recommend? Is bridging a long term solution and does the bridging have any drawback (none working features for instance)?
2) if JSF is no longer an option, what web front-end technology would you use for a new Spring-based application? back to JSP? templating like thymeleaf? GWT or vaadin? Javascript technologies like reactJS or angular and working with two languages and data model?
Thanks for sharing
My organization used to be on JSF + Spring, but now we are moving toward Spring MVC + Thymeleaf. Using Angular or React with Spring MVC REST is not a bad option either, but Spring MVC + Thymeleaf will be a much more natural fit with much faster onboarding for the Java team.
MyFaces 2.3.x should still work on Spring. However, i'm not sure if this will be possible with 3.x.
If you don't want to drop Spring, you can also add the CDI implementation "Apache OpenWebBeans", which is very very small (between 0,5mb and 1mb).
There are "bridges" available on the web, how to inject Spring beans into CDI beans and vice versa.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
I am trying to migrate one of my projects from Spring Boot 1.5.10.RELASE to 2.0.0.RC1. And seems like they made some major changes in API, because I cannot find #EnableOAuth2Sso and UserInfoRestTemplateCustomizer that I used to make some configuration for Azure AD and OAuth2.
Where can I find new documentation or change list for Spring Boot 2.0.0 and OAuth2?
I recommend reading Spring Boot 2.0 official migration guide.
To quote from there, the most interesting thing for you will be:
Functionality from the Spring Security OAuth project is being migrated
to core Spring Security. Dependency management is no longer provided
for that dependency and Spring Boot 2 provides OAuth 2.0 client
support via Spring Security 5.
To elaborate on bjedrzejewski's answer with the specific artifact information and how I found it:
After discussions in an existing GitHub issue on spring boot, I was eventually led to the annotation's location in the 2.0.0 release. It has been moved to a project completely new to the 2.0.0 release artifacts.
To resolve this issue and migrate your project, add the artifact org.springframework.security.oauth.boot:spring-security-oauth2-autoconfigure to your dependency management configuration.
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 7 years ago.
Improve this question
I'm confused why should i use Spring Boot for my next project? Is Spring Boot as powerful as Spring Boot-less? Or there is something you can't do with Spring Boot.
Spring Boot is opinionated Spring setup with batteries included. If you use it, you will waste less time on non-features because you will be getting quite a few things for free. List of advantages that I've observed compared to classical Spring setup (surely there are more, check the Spring Boot website):
dependency management - versions of commonly used libraries are pre-selected and grouped in different starter POMs that you can include in your project. By selecting one Spring Boot version you are implicitly selecting dozens of dependencies that you would have to otherwise select and harmonize yourself
auto-configuration - you do not have to manually configure dispatcher servlet, static resource mappings, property source loader, message converters etc.
advanced externalized configuration - there is a large list of bean properties that can be configured through application.properties file without touching java or xml config
"production ready" features - you get health checking, application and jvm metrics, jmx via http and a few more things for free
runnable jars - you can package your application as a runnable jar with embedded tomcat included so it presents a self-contained deployment unit
I haven't observed any disadvantages, it's just Spring after all. You can build anything that you could build with "vanilla" Spring, only faster.
Here is my simple explanation:
Without Spring Boot, one will have to put the correct versions of all the dependencies in the build configuration file (e.g. pom.xml) and configure all the beans manually.
This seems like a lot of non-functional task for normal projects. Hence, Spring Boot does these automatically, assuming some conventions. For example, if you just include spring-boot-starter-web dependency in your pom.xml, a web application will be automatically configured by assuming default conventions.
What makes it more interesting is that the pieces of the default configuration can be very easily overridden.
Going through a couple of official guides would give more insight on Spring Boot. In summary, unless an application is abnormal enough, people seem to be preferring Spring Boot nowadays.
Coming to power, Spring Boot could be seen as just a configuration layer. So, everything possible in Spring should also be possible using Spring Boot.
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 8 years ago.
Improve this question
1/ did Spring DM is very used now on Enterprise Applications ? what are the benefits of this framework and why it seem like a dead technology
2/ I'm working on a Spring Application , I want to do it as an SOA and i don't know if spring DM will be useful for me.
3/ I have another question , we can integrate an open source solution ESB with Spring ? what's the best choice for ESB.
Thanks !
1) Spring DM is mostly abandoned by Spring, as well as OSGI support. See this key quote from the Spring creator in this important interview on the subject:
We have changed our views on OSGi over the years, and one of the
reasons for that is that OSGi simply cannot be made as easy to use and
as productive as we feel is consistent with Spring values.
See also SpringFramework Removes OSGi Metadata in Move to Gradle
2) and 3) try to use Spring Integration or Apache Camel, which is well integrated with Spring. Both allow to have ESB like functionality embedded in a normal WAR application, so no need for a separate ESB server.