Eclipse's construction of the Spring-boot,spring-boot-mybatis

Source: Internet
Author: User

1. Preparatory work

1.1. If you do not have an STS (Spring tool suite) plugin, you need to download it.

1.1.1.Eclipse Download, be sure to pay attention to the version, because eclipse will download the latest version directly, if the TS version does not correspond to eclipse, it will not be new Springboot project. Help--> Eclipse Marketplace, then select Popular, select STS, click Install. (Note: Before downloading, MAVEN's image file is tuned to Aliyun).

After the download is complete, if the version is not correct, you need to update: Help-->install New software-->work with input: http://dist.springsource.com/release/TOOLS/ update/e4.6/

Note: e4.6 is the version of my Eclipse, view Eclipse version: Help-->about Eclipse, then click the Eclipse icon (usually the first one) to find the eclipses under Featrue name Platform view version.

1.2. You can also choose to download here: https://spring.io/tools/sts/legacy, install self-degree Niang.

2. New Sprint boot

2.1.new-->other-->spring boot, select Spring Stater Project, fill in as needed, after next, select Web, select SQL

And then select the database, my is MySQL, I want to integrate MyBatis, so also point Mybastis. (If you just click on the Web, you'll be able to create a new spring boot)

2.2. When the new is completed, the jar package is self-org.codehaus.plexus.archiver.jar.Manifest.write, and if the MAVEN version is too low, the POM will report an error (Java.io.PrintWriter). Solutions are:

 Enter the following in the help --> Install New Software > Work with

https://otto.takari.io/content/sites/m2e.extras/m2eclipse-mavenarchiver/0.17.2/N/LATEST/,
然后回车,等待,安装完毕后重启即可。

配置数据库连接:

spring.datasource.url=jdbc:mysql://localhost:3306/database name
Spring.datasource.username=pass
spring.datasource.password= Password
Spring.datasource.driver-class-name=com.mysql.jdbc.driver

#配置maper映射文件, under the Mapper file under resource
mybatis.mapper-locations= Classpath:mapper/*.xml



Eclipse's construction of the Spring-boot,spring-boot-mybatis

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.