1.... pom.xml 依赖jar包
1 <?xml version="1.0" encoding="UTF-8"?> 2 <project xmlns="http://maven.apache.org/POM/4.0.0" 3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 4 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 5 <modelVersion>4.0.0</modelVersion> 6 7 <groupId>com.wsc</groupId> 8 <artifactId>springBoot01</artifactId> 9 <version>1.0-SNAPSHOT</version> 10 <!--继承SpringBoot父类 spring-boot-starter-parent--> 11 <parent> 12 <groupId>org.springframework.boot</groupId> 13 <artifactId>spring-boot-starter-parent</artifactId> 14 <version>2.0.2.RELEASE</version> 15 </parent> 16 17 <properties> 18 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> 19 <maven.compiler.source>1.8</maven.compiler.source> 20 <maven.compiler.target>1.8</maven.compiler.target> 21 </properties> 22 <dependencies> 23 <dependency> 24 <groupId>org.springframework.boot</groupId> 25 <artifactId>spring-boot-starter-web</artifactId> 26 </dependency> 27 <!--添加起步依赖--> 28 <dependency> 29 <groupId>mysql</groupId> 30 <artifactId>mysql-connector-java</artifactId> 31 </dependency> 32 <dependency> 33 <groupId>org.springframework.boot</groupId> 34 <artifactId>spring-boot-starter-freemarker</artifactId> 35 </dependency> 36 <dependency> 37 <groupId>org.springframework.boot</groupId> 38 <artifactId>spring-boot-starter-data-jpa</artifactId> 39 </dependency> 40 <!--mybatis 起步依赖--> 41 <dependency> 42 <groupId>org.mybatis.spring.boot</groupId> 43 <artifactId>mybatis-spring-boot-starter</artifactId> 44 <version>1.1.1</version> 45 </dependency> 46 <!--测试的起步依赖--> 47 <dependency> 48 <groupId>org.springframework.boot</groupId> 49 <artifactId>spring-boot-starter-test</artifactId> 50 <scope>test</scope> 51 </dependency> 52 </dependencies> 53 <!-- build 作用 : 扫描 mapper 下的 FlightMapper类 完成 自动注入对象, 54 Invalid bound statement (not found): com.wsc.core.mapper.FlightMapper.getFlight --> 55 <build> 56 <resources> 57 <resource> 58 <directory>src/main/java</directory> 59 <includes> 60 <include>**/*.properties</include> 61 <include>**/*.xml</include> 62 </includes> 63 <filtering>false</filtering> 64 </resource> 65 <resource> 66 <directory>src/main/resources</directory> 67 <includes> 68 <include>**/*.*</include> 69 </includes> 70 <filtering>false</filtering> 71 </resource> 72 </resources> 73 </build> 74 </project>