Getting started rely on small DEMO-

Started dependence

Creating the Maven project springboot_demo (are packaged jar) 

Add the following dependency in pom.xml

  <parent>

    <groupId>org.springframework.boot</groupId>

    <artifactId>spring-boot-starter-parent</artifactId>

<version>1.4.0.RELEASE</version>

  </parent>

  <dependencies>

    <dependency>

        <groupId>org.springframework.boot</groupId>

        <artifactId>spring-boot-starter-web</artifactId>

    </dependency>

</dependencies>

We will be surprised to find that our project automatically add all sorts jar package

 

 

 

........

And these jar package jar official development we do need to import the package. Because these packages are quoted jar spring-boot-starter-web we have just introduced, so we rely on references will automatically transfer over the spring-boot-starter-web.

Change JDK version

We found that default JDK version 1.6 project, and we usually use version 1.7, so we need to add the following configuration in pom.xml

  <properties>

    <java.version>1.7</java.version>

</properties>

After adding the update project, you will find version 1.7 has been changed

Guess you like

Origin www.cnblogs.com/coder-wf/p/12518363.html