STS does not allow me to select framework version 4 - spring-tool-suite

Is it correct that STS does allow me to select spring framework version 4 when I create a new "Spring Framework" project ?
I have version 3.6.3.SR1 of the Spring Tool Suite.

Looks like some wizards are and may not allow to select the latest Spring Framework from the UI. You can still open pom.xml once the project is created and fix the Spring Framework version in it.
It is advised to use the new "Create Spring Starter Project" wizard available from the Dashboard as well as from the standard File -> New.

Related

What is the difference between Spring Tool Suite 3 and 4?

I want to study Spring. In the case of STS (Spring Tool Suite) 3, there is "Spring legacy Project". 4 has a "Spring Starter Project", is it the same?
When I asked the Internet, people say "just use version 3".
What is the difference between version 3 and version 4?
Is "Spring Starter Project" and "Spring Legacy Project" the same thing?
1.What is the difference between version 3 and version 4?
Version 4.0 is the latest major release of the Spring Framework and the first to fully support Java 8 and few new features.[more]
Is "Spring Starter Project" and "Spring Legacy Project" the same thing?
Technically both are same spring project's. But they have some difference in configuration and build areas.
Spring Starter Project- Helps to create the spring boot project.(Spring Boot is basically an extension of the Spring framework which eliminated the boilerplate configurations required for setting up a Spring application.)
Spring Legacy Project - Helps to create the spring maven project. In which all the required configuration like servlet context,web,.. need to be configured manually either by using xml file or java classes.
Take a look at this page to know more about the difference between spring vs spring boot
If you are going to start learning spring from beginning, my suggestion is use Spring Starter Project because in Spring boot project setup is so simple, you can start coding with zero manual configuration.
For a more detailed introduction of the Spring Tools 4, please take a look at the blog post from the initial GA release of the Spring Tools 4:
https://spring.io/blog/2018/09/25/spring-tools-4-ga-released
There is no direct relation between the version numbers of the Spring Framework itself and the Spring Tools. In general, the Spring Tools 4 as well as the older Spring Tool Suite 3 support various Spring versions, ranging from Spring Framework 3 up to Spring Framework 5.2 and beyond.
I would strongly recommend to start with learning Spring by starting with Spring Boot, not the Spring Legacy projects. This is the way modern Spring applications are being built nowadays... :-)

Spring boot jpa tool is not available in STS(Spring Tool Suite) for converting tables to entities

Here i am working in Spring boot in Spring tool Suite.I want to convert an Oracle databse tables to JPA Class Entites. But i did not get any JPA tools in project_folder ->jpa tools. What i have to do can you please suggest a better solution. Thanks
Create a JPA project like so
File -> New -> JPA Project(Go to Others if JPA projects is not here)
After you have created your JPA project you can right click the project in the Project Explorer
Project Explorer -> Right-Click -> JPA Tools -> Generate Entities from Tables
Hope this helps.
Update 1
If you are not getting options of creating a JPA project in your eclipse you might not be having the required tools for JPA support. Check this.
You can go to "Install New Software", select the Eclipse Oxygen Update
Site, and then search for the JPA tooling - and install it from there.
This brings back the JPA tooling.
In order to Install New Software, go to Help\Install New Software..., select the Eclipse Oxygen Update Site: https://download.eclipse.org/releases/oxygen/, and then search for the JPA tooling.
Eclipse Projects created as 'Spring Boot - Spring Starter Project' are not-faceted projects per default. Therefore there don't have the JPA-facet which offers the Wizzard to generate JPA entities from tables.
You need to add the JPA-Project Facet to your project.
Project > Properties > Project Facets > JPA
If your project is not configured to use project facets, you'll get a message asking if you want to convert it to a faceted project.
Help -> Install New Software -> work with https://download/eclispe.org/releases/2019-03 -> filter 'JPA' ->
Uncheck 'Contact all update sites during install to find required software'
Try installing Jboss toll from marketplace, I had same issue and it is fixed now.

Eclipse STS can't select latest spring version

When choosing File > new Spring Project > Simple Spring Maven I cannot select the latest Spring version under 'select spring version:'.
Options are 3.0.7, 3.1.4, 3.2.3 or default.
Why am I not able to choose 4.2.2.RELEASE version ? Should I do it manually in the pom.xml everytime I start a new project ?
Thanks!
There are two wizards you can use 'New Spring Project' and 'New Spring Starter Project'. Maybe the names are a little confusing. So let me explain.
The 'New Spring Project' is the 'old', 'legacy' wizard.
The 'New Spring Starter' one is the more modern wizard.
The old wizard really should have been removed when we created the new one. But as some folks using STS are really conservative and want to keep using it the wizard is still there. As its an old wizard, it uses old-style template projects which use old spring framework versions.
If you want something more modern, try the other wizard it creates an empty project using Spring Boot and up-to-date versions of spring framework.

How can I use Springsource templates in Groovy on Grails Toolsuite?

I am using Groovy on Grails Toolsuite 3.1.0.
I want to use a template for a Spring MVC application.
I am not finding the template where I would expect it in File – > New -> New Spring Template Project -> Spring MVC Project
Has anybody used SpringSource templates in Groovy on Grails Toolsuite?
I used help -> install new software then I entered http://dist.springsource.com/release/TOOLS/update/e3.8 as the update site and installed Core, Extensions, Integrations, and Resources for Spring IDE.

Best practice for create web project in Eclipse/STS that supports maven and spring 3+

I recently completed the SpringCore training but never got this answer. I want to know the best possible way to create Dynamic Web Project in STS/Eclipse that supports Maven and Spring 3+
Is it to use the wizard and create a Dynamic Web Project then add Maven support and Spring Behavior?
Is it to use the wizard and create a Maven project and use archetype webapp then add Spring support?
Is it to use the wizard and create a Spring project add the Java EE project facet and Maven Support?
Is it something totally different?
I choose to create first dynamic web project, then add spring behavior and finally to build the project i am using maven.. which is really a powerfull tool.