Error from "spring-test" and "spring-boot-starter-thymeleaf" - spring

If we start from this Spring guide , and just add the following additional dependencies in the build.gradle (without modifying any Java code), there will be a lot of error messages coming out during project compilng.
compile("org.springframework.boot:spring-boot-starter-thymeleaf:1.1.5.RELEASE")
compile("org.springframework:spring-test:4.1.1.RELEASE")
However, if we switch the version of spring-test from 4.1.1.RELEASE to 3.2.11.RELEASE, we can run this Spring project again.
Does anyone know the reason of this "conflict"?

Related

Unable to create a spring starter project in STS

I am trying to create a spring starter project in STS. I am selecting the gradle distribution and the Spring web dependency. When I click on finish I am getting the following error message. Error message
Don't forget to configure your proxy in your IDE.
Please look at this tutorial
Looks like a connection issue from your end caused due probably due to unstable network. In any case you can always add dependencies and download the project from https://start.spring.io

Making a spring boot fat jar file with gradle WITHOUT a spring boot gradle plug-in (no access to bootJar)

I have a spring-boot application in which I loaded all the necessary (or so I believe) dependencies to run without using spring-boot initializer or the spring-boot gradle plug-in. These tools are not available for me at my work. I can run the application through intellij without issues, but when attempting to run a fat jar, I am met with
No auto configuration classes found in META-INF/spring.factories.
Now the spring.factory files ARE located inside the fat jar (there are multiples of them) and they are inside the meta-inf directory.
Spring boot has so much automated functionality, I am not sure where to begin. There are a lot of similar posts and everyone just tells people to use the spring-boot gradle plugin bootJar task but as I said these are not available to me. I need to get it running without those tools,
if anyone has insight into what the issue may be or how to resolve it, any help is appreciated. I will try to add more details later.
I am using spring-boot v. 2.1.1 and spring 5.1.4

Adding a gatling test to a Spring Boot gradle project on IntelliJ

I have a Spring Boot 2 application written in Kotlin (could be Java). The project uses gradle (not maven). The application exposes HTTP endpoints that I want to load test using gatling.
I created a MySimulation.scala file under src/test/gatling. IntelliJ suggested and I accepted the intallation of the Scala IntelliJ plugin. So, I got syntax highliting on the scala editor. :^)
I'd like to have code assist (drill down, code completion) for the scala gatling tests.
What other tools/plugins/configuration do I need to add?
(I have the gatling bundle already installed on my computer. IntelliJ version is 2018.2.4.)

Configuring Spring security with spring boot on already created project, IntelliJ

I have previous experience in Spring MVC but I am new to Spring Boot.
I am Using IntelliJ for the first time.
What I noticed is that when you create a Spring boot project with security dependencies added during the time of creation, Then the IDE creates the project already configured With Basic Authentication whereas if I add dependencies to pom.xml after creation, then the application won't get configured with basic authentication automatically.
Can anyone explain this behavior of IntelliJ and can anyone help me with steps for configuring the pre-created project with Basic Authentication?
IntelliJ is using
https://start.spring.io/
to initialise your project. After the project is initialised, the IDE doesn't modify your code in any way. That is the normal behaviour and it is not Spring Boot related.
NOTE: The dependency that you add in your pom.xml is just pulling down that dependency, but if you need to use it you do the code yourself. (More information about Maven: https://en.wikipedia.org/wiki/Apache_Maven)

Spring Boot: change from Java Servlet 3.1 to 3.0

In Eclipse (STS) I created a project as follows:
File -> New -> Spring Starter Project
The settings are (among others):
Type: Maven Project
Packaging: War
Java Version: 1.8
Language: Java
Boot Version: 1.3.0
Dependencies: Web
In the project facets it leads to Dynamic Web Module = 3.1, however I need 3.0.
Manually setting it to 3.0 leads to "Cannot change version of project facet Dynamic Web Module to 3.0".
Besides this error message I am sure this is not the right way to change it because the project will be shared to others.
I guess there is a maven way.
Maybe the solution is somewhere here: http://docs.spring.io/spring-boot/docs/1.3.0.RELEASE/maven-plugin/plugin-info.html.
Unfortunately Spring Boot and Maven are not my special topics (yet).
Not the correct way but, the easiest way to fix that issue is 'Delete' that error from the 'Problems' tab. It will be removed and your code will be compiled on STS. But, it may come back at some point then just delete that error again.

Resources