Several issues with spring toolkit 3.6.3

I wanted to learn Spring MVC, and I looked at javavids - YouTube , I wanted to follow along with this series, but I have many problems / problems First I rebuild the global repo in Maven repositories.

solvable

enter image description here

then I created a Maven project, but the structure in the video was

enter image description here

but instead i have

solvable

enter image description here

Now I want to add plugins to pom.xml, but get this dialog in the videos shown:

UPDATE
enter image description here
I do not get a plugin to choose from
enter image description here
solvable
I also have a compiler enter image description here when i install the compiler in java 1.7 then i get solvable
enter image description here

and finally, when I tried to update STS 3.6.3. It freezes and shows enter image description here
Ok
I have proxy settings as

enter image description here

Update I make changes and add dependency in accordance with this
I get this error:
enter image description here
Now I don’t see the resources that can help me solve these remaining problems! Any help is much appreciated.

+6
source share
4 answers

The first level of the maven compiler is 1.5 by default. To install it in 1.7, configure maven-compiler-plugin

<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.3</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> 

or add the following properties.

 <properties> <maven.compiler.source>1.7</maven.compiler.source> <maven.compiler.target>1.7</maven.compiler.target> </properties> 

After installing the java version, press Alt + F5 to update the maven project.

To search for dependencies or plugins, go to Window β†’ Settings β†’ Maven and select the Download repository index update on startup check box

Restart STS, wait for the index update to complete.

As for your verification of the project structure, you have <packaging>war</packaging> in your pom.xml. By default it will be jar .

+1
source

then I created a Maven project, but the structure in the video was

You can switch perspective in idea (eclipse). In the video, which is Java EE-Perspective.

What you got is Spring-Vista, don't worry about it.

Window β†’ Open Perspective

Now I want to add plugins to pom.xml, but getting this dialog

Well, what's wrong with that?

If you are looking for dependency on the MVN Repository , you will get all the information to populate the information that you see in the dialog box. Otherwise, you can open the pom file and paste the link directly.

I also have a compiler

Assuming you are using the m2e plugin in Eclipse, you need to specify the source and target versions as 1.7 for the maven-compiler-plugin.

specify it as follows:

 <properties> <maven.compiler.target>1.7</maven.compiler.target> <maven.compiler.source>1.7</maven.compiler.source> </properties> 

And update your project Right-click the project -> maven -> update project (Alt F5)

The network seems to be working fine. Are you in a private or office network?

+1
source

I would also recommend starting with Spring using the Spring toolkit using Spring Boot and the http://spring.io/guides tutorial. You can import these manuals directly into STS and start from there (provided that you have a network connection).

+1
source

I think the solution that I provide here will be a guarantee that this will work for you. If you downloaded Spring STS successfully, you should only complete these steps.

Select New Project

Select SPring Project

Enter Project name

After creating the project, right-click the project and update the Maven project

For integration with the Google App Engine, it is very simple. You should simply declare the google engine mechanism dependency in pom.xml. I give you the structure of my Google App engine Spring project.

Please follow these steps. 1. create appengine-wex.xml in the WEB-INF folder 2. Create a logging.properties file in the WEB-INF folder 3. Paste the Google-specific applications.

Here is an example appengine-web.xml

  <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE xml> <appengine-web-app xmlns="http://appengine.google.com/ns/1.0"> <application>make-me</application> <version>2</version> <!-- Allows App Engine to send multiple requests to one instance in parallel: --> <threadsafe>true</threadsafe> <!-- Configure java.util.logging --> <system-properties> <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/> </system-properties> <!-- HTTP Sessions are disabled by default. To enable HTTP sessions specify: <sessions-enabled>true</sessions-enabled> It possible to reduce request latency by configuring your application to asynchronously write HTTP session data to the datastore: <async-session-persistence enabled="true" /> With this feature enabled, there is a very small chance your app will see stale session data. For details, see http://code.google.com/appengine/docs/java/config/appconfig.html#Enabling_Sessions --> </appengine-web-app> 

Pom dependency

 <dependency> <groupId>com.google.appengine</groupId> <artifactId>appengine-api-1.0-sdk</artifactId> <version>1.9.1</version> </dependency> <!-- JUnit --> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.10</version> <scope>test</scope> </dependency> <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-all</artifactId> <version>1.9.0</version> <scope>test</scope> </dependency> <dependency> <groupId>com.google.appengine</groupId> <artifactId>appengine-testing</artifactId> <version>1.9.1</version> <scope>test</scope> </dependency> <dependency> <groupId>com.google.appengine</groupId> <artifactId>appengine-api-stubs</artifactId> <version>1.9.1</version> <scope>test</scope> </dependency> 

Final structure

enter image description here

+1
source

Source: https://habr.com/ru/post/988284/


All Articles