add to Gradle We can add Maven Dependent websites  
Maven Repository: Search/Browse/Explore 
http://mvnrepository.com/ 
Up lookup , For example, we search  spring-core  Dependence

Click on Gradle tab , see Gradle The way dependence is written .

IDEA Tools help us generate by default build.gradle

group 'com.winner'
version '1.0-SNAPSHOT'
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'idea'
// Specify compile .java Of documents jdk edition
sourceCompatibility = 1.8
repositories {
// send gradle Projects can use local warehouses
mavenLocal()
mavenCentral()
}
dependencies {
//testCompile amount to pom.xml in scope The value is test
testCompile group: 'junit', name: 'junit', version: '4.11'
compile group: 'org.springframework', name: 'spring-core', version: '4.3.3.RELEASE'
}

About mavenLocal() Explanation

 /**
* Adds a repository which looks in the local Maven cache for dependencies. The name of the repository is
* {@value org.gradle.api.artifacts.ArtifactRepositoryContainer#DEFAULT_MAVEN_LOCAL_REPO_NAME}.
*
* <p>Examples:
* <pre autoTested="">
* repositories {
* mavenLocal()
* }
* </pre>
* </p>
* <p>
* The location for the repository is determined as follows (in order of precedence):
* <ol>
* <li>The value of system property 'maven.repo.local' if set;</li>
* <li>The value of element &lt;localRepository&gt; of <code>~/.m2/settings.xml</code> if this file exists and element is set;</li>
* <li>The value of element &lt;localRepository&gt; of <code>$M2_HOME/conf/settings.xml</code> (where <code>$M2_HOME</code> 
is the value of the environment variable with that name) if this file exists and element is set;</li> * <li>The path <code>~/.m2/repository</code>.</li> * </ol> * </p> * * @return the added resolver */ MavenArtifactRepository mavenLocal();

add to Gradle Depend on and depend on build.gradle More articles about configuration

  1. build.gradle(Project) and build.gradle(Module) The difference between

    Reference resources : http://stackoverflow.com/questions/28295933/difference-between-build-gradleproject-and-build-gra ...

  2. Android(java) Learning notes 127:Android Studio In the new project build.gradle、settings.gradle

    With the rapid development of information technology ,IT Projects are getting more and more complex , It's usually done by multiple subsystems working together . For this kind of multi system . Multi project situation , A lot of build tools have provided good support , image maven.ant.Gradle Besides learning from ant perhaps ...

  3. build.gradle Code

    Android Studio Such a powerful tool , Even if we don't understand gradle, groovy, We can also use AS Yes Android Project to compile . debugging . function . Packing and other operations .build.gradle This file ...

  4. Android(java) Learning notes 67:Android Studio In the new project build.gradle、settings.gradle

    With the rapid development of information technology ,IT Projects are getting more and more complex , It's usually done by multiple subsystems working together . For this kind of multi system . Multi project situation , A lot of build tools have provided good support , image maven.ant.Gradle Besides learning from ant perhaps ...

  5. Android Gradle Building tools (Android Gradle Build Tools) What is it? ?

    Reprinted address :http://mrfu.me/android/2015/07/17/New_Android_Gradle_Build_Tools/ Translator's address :[ double ] Look at the new Android Gradle structure ...

  6. Gradle Understanding of series Gradle Mission

    The original is issued on the official account of WeChat. jzman-blog, Welcome to exchange . I have learned the previous articles Gradle Build the basics of the task , I understand Project and Task These two concepts , It is suggested to read the previous articles first : Gradle series ...

  7. Android Project and app Two of them build.gradle Configuration difference

    Android  It's been developing for a long time , Used from the beginning AndroidStudio Development , But actually I'm right about AS(AndroidStudio abbreviation ) I really don't understand deeply . ok , Actually, I only know AS It's a pretty powerful worker ...

  8. Android Deep understanding of development Android Studio Build file build.gradle To configure

    Abstract : Once a week , Learn more Android course ,TeachCourse Today I bring an article about Android Studio Build file build.gradle Related configuration of , Focus on several aspects of learning :1.applica ...

  9. [Android] To configure build.gradle Dynamic transfer parameters

    (1) One Android One of the projects is build.gradle Be responsible for Project Scope , and Module Each of them has its own build.gradle It's dedicated to modules . (2) stay Gradle in Task First class citizen , ...

Random recommendation

  1. CloudNotes Desktop client : The implementation of plug-in system

    [CloudNotes Please click here for version update history and download address ] [CloudNotes Please click here for the summary list of Chinese series articles ] [ see CloudNotes Source code please click here ] occasionally , The same noun , For different people ...

  2. MacPE+WinPE- The black apple road

    In the process of loading black apples , install . Backup . Recovery needs to start to MAC, Always booting from hard disk is too risky for hard disk data , Think about installing pe Used for maintenance , In addition, on hand winpe, Also want to achieve , In order to avoid two u disc . Found a website to start ,http://b ...

  3. be based on Flume Meituan's log collection system ( Two ) Improve and optimize

    stay < be based on Flume Meituan's log collection system ( One ) Architecture and Design > in , We elaborate on the basis of Flume The architecture design of meituan log collection system , And why design like this . In this section , We will talk about the problems encountered in the actual deployment and use ...

  4. 【 turn 】Java transient keyword

    Volatile Modifies a member variable each time it is accessed by a thread , Force to reread the value of the member variable from main memory . and , When a member variable changes , Force the thread to write the change back to main memory . So at any moment , Two different threads always see the same name of a member variable ...

  5. Python in pass The function of sentences

    http://mianshi.fenzhi.com/post/1529.html pass The statement does nothing , Generally as placeholders or create placeholders ,pass Statement does nothing , such as :while False:p ...

  6. The Windows of the world (TheWorld) browser 3.6.1.0 Simplified Chinese green version

    Software name : The Windows of the world (TheWorld) browser 3.6.1.0 Simplified Chinese green software language : Simplified Chinese authorization method : Free software running environment : Win7 / Vista / Win2003 / WinXP Software size ...

  7. netflix zuul Study

    netflix zuul yes netflix One developed EDGE SERVICE. Mainly as a API Gateway The server , Security can be achieved , Flow control and other functions . I'm looking at 1.x Version of ,Zuul1.x The implementation of the ...

  8. scrollIntoView() The call element can appear in the window

    /* If you scroll the page, it's the same DOM An unsolved problem . To solve this problem , The browser implements the following method , In order to facilitate developers how to better control the page scrolling . In a variety of proprietary methods ,HTML5 I chose scrollIntoView() do ...

  9. Service and discovery of microservice architecture -Spring Cloud

    1 Why service discovery is needed Simply speaking , The core of service is to divide the traditional one-stop application into one service according to the business , On this basis, microservices should be decoupled more thoroughly ( No more sharing DB.KV, Get rid of the heavyweight ESB), And emphasize DevOps And fast ...

  10. PHP PC Alipay scan code payment

    The previous article has described the process of creating an application contract on the ant financial services open platform , See :PHP App Alipay paid , Not much here , The rest is in two steps , The first step is to prepare for payment , That is to integrate payment documents , I've integrated it so I can use it directly , Code on ...