首先编写mybatis配置的xml文件,将其放入resource目录下: mybatis-config.xml: <?xml version="1.0"encoding="UTF-8"?><!DOCTYPE configuration PUBLIC"-//mybatis.org//DTD Config 3.0//EN""http://mybatis.org/dtd/mybatis-3-config.dtd"><configuration><environments default="mysql"><environment id="my...
-- 给maven项目指定编译版本 --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <target>1.8</target> 1.8 </configuration> </plugin> 1. 2. 3. 4. 5. 6. 7. 8. 9. 10....
maven install项目生成target文件时, 不会把Resource外的xml文件编译进去,此时需要自己把main/java中xml文件导入到target文件中,需要在pom.xml中加入: <build> <resources> <resource> <directory>src/main/java</directory> <excludes> <exclude>**/*.java</exclude> </excludes> </resource> <resource> <direct...
<?xml version="1.0" encoding="UTF-8"?> <suite name="maven test"> <test name="TestNG testing"> <packages> <package name="com.qa.tests.*"/> </packages> </test> </suite> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instanc...