Problem. Spring source conversion to eclipse problems

Source: Internet
Author: User
Tags class definition

1. Download Spring Source

2. Download the installation Gradle, configure the environment variables (need to have a Java environment)

3. Execute the command under the Spring subproject: Gradle Cleanidea Eclipse, the corresponding. Project and. classpath files are generated

4.eclipse Importing Project

The first and second steps do not have to be said, in the third step encountered a following problem:

The error report should mean that the arguments to the constructor simultaneous that called Projectdependency do not match the definition. Fortunately, the report says where to call: Ide.gradle line:24, found this place in the Spring directory:

Obviously the parameter passed in when creating the object does not match the definition of the constructor, and it is known that the class is defined by Gradle, so we can confirm how the next Gradle defines the class.

Need to download gradle full-volume package, in the SRC directory can find the corresponding source code, so find the definition of this class:

As you can see, the constructor simply passes a path, and the meaning of this annotation should be the path at which the parameter is passed.

This time hold to try the mentality will, the parameter project (": ${projectname}"). After the path is removed, re-execute the command, luckily, the problem is gone ... Build successful.

This place suspects that Gradle has updated the function definition, but spring has not updated the script. Maybe they use a different version of Gradle than mine. My local is gradle-4.0.

This problem, in fact, is the script is wrong, according to the prompt to find the corresponding class definition know what parameters should be passed. In fact, a little more careful will find git up and down the source is used by the gradle-3.5 to build.

Problem. Spring source conversion to eclipse problems

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.