maven新建ssm项目中pom.xml文件内容

1、开发工具使用时的idea

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0modelVersion>
  <groupId>com.testmavenwebgroupId>
  <artifactId>MvnDemoartifactId>
  <packaging>warpackaging>
  <version>1.0-SNAPSHOTversion>
  <name>MvnDemo Maven Webappname>
  <url>http://maven.apache.orgurl>
  <properties>
    
    <spring.version>4.0.2.RELEASEspring.version>
    
    <mybatis.version>3.2.6mybatis.version>
    
    <slf4j.version>1.7.7slf4j.version>
    <logback.version>1.1.3logback.version>
    <log4j.version>1.2.17log4j.version>
    
    
    <cxf.version>2.7.7cxf.version>
   properties>
   <dependencies>
     <dependency>
       <groupId>junitgroupId>
       <artifactId>junitartifactId>
       <version>4.11version>
       <scope>testscope>
     dependency>

   
  <dependency>
    <groupId>org.springframeworkgroupId>
    <artifactId>spring-coreartifactId>
    <version>${spring.version}version>
  dependency>
  <dependency>
    <groupId>org.springframeworkgroupId>
    <artifactId>spring-webartifactId>
    <version>${spring.version}version>
  dependency>
  <dependency>
    <groupId>org.springframeworkgroupId>
    <artifactId>spring-txartifactId>
    <version>${spring.version}version>
  dependency>
  <dependency>
    <groupId>org.springframeworkgroupId>
    <artifactId>spring-jdbcartifactId>
    <version>${spring.version}version>
  dependency>
  <dependency>
    <groupId>org.springframeworkgroupId>
    <artifactId>spring-webmvcartifactId>
    <version>${spring.version}version>
  dependency>
  <dependency>
    <groupId>org.springframeworkgroupId>
    <artifactId>spring-aopartifactId>
    <version>${spring.version}version>
  dependency>
  <dependency>
    <groupId>org.springframeworkgroupId>
    <artifactId>spring-testartifactId>
    <version>${spring.version}version>
  dependency>
  
  <dependency>
    <groupId>org.mybatisgroupId>
    <artifactId>mybatisartifactId>
    <version>${mybatis.version}version>
  dependency>
  
  <dependency>
    <groupId>org.mybatisgroupId>
    <artifactId>mybatis-springartifactId>
    <version>1.2.2version>
  dependency>
     
  <dependency>
    <groupId>com.github.pagehelpergroupId>
    <artifactId>pagehelperartifactId>
    <version>4.2.0version>
  dependency>
  
  <dependency>
    <groupId>javaxgroupId>
    <artifactId>javaee-apiartifactId>
    <version>7.0version>
  dependency>
  
  <dependency>
    <groupId>mysqlgroupId>
    <artifactId>mysql-connector-javaartifactId>
    <version>5.1.30version>
  dependency>
  
  <dependency>
    <groupId>commons-dbcpgroupId>
    <artifactId>commons-dbcpartifactId>
    <version>1.2.2version>
  dependency>
    
  <dependency>
    <groupId>org.apache.cxfgroupId>
    <artifactId>cxfartifactId>
    <version>${cxf.version}version>
    <type>pomtype>
  dependency>
  <dependency>
    <groupId>org.apache.cxfgroupId>
    <artifactId>cxf-rt-frontend-jaxwsartifactId>
    <version>${cxf.version}version>
  dependency>
  <dependency>
    <groupId>org.apache.cxfgroupId>
    <artifactId>cxf-rt-transports-httpartifactId>
    <version>${cxf.version}version>
  dependency>
    <dependency>
      <groupId>org.apache.cxfgroupId>
      <artifactId>cxf-rt-transports-http-jettyartifactId>
      <version>${cxf.version}version>
    dependency>
     
     <dependency>
       <groupId>com.alibabagroupId>
       <artifactId>dubboartifactId>
       <version>2.5.3version>
       <type>jartype>
       <scope>compilescope>
       <exclusions>
         <exclusion>
           <artifactId>springartifactId>
           <groupId>org.springframeworkgroupId>
         exclusion>
       exclusions>
     dependency>
  
  
    <dependency>
      <groupId>log4jgroupId>
      <artifactId>log4jartifactId>
      <version>${log4j.version}version>
    dependency>
  <dependency>
    <groupId>org.slf4jgroupId>
    <artifactId>slf4j-apiartifactId>
    <version>${slf4j.version}version>
  dependency>
  <dependency>
    <groupId>ch.qos.logbackgroupId>
    <artifactId>logback-classicartifactId>
    <version>${logback.version}version>
  dependency>
  <dependency>
    <groupId>ch.qos.logbackgroupId>
    <artifactId>logback-coreartifactId>
    <version>${logback.version}version>
  dependency>
  
  <dependency>
    <groupId>com.alibabagroupId>
    <artifactId>fastjsonartifactId>
    <version>1.1.41version>
  dependency>
  
  
  <dependency>
    <groupId>org.codehaus.jacksongroupId>
    <artifactId>jackson-mapper-aslartifactId>
    <version>1.9.13version>
  dependency>
  
  <dependency>
    <groupId>commons-fileuploadgroupId>
    <artifactId>commons-fileuploadartifactId>
    <version>1.3.1version>
  dependency>
  <dependency>
    <groupId>commons-iogroupId>
    <artifactId>commons-ioartifactId>
    <version>2.4version>
  dependency>
  <dependency>
    <groupId>commons-codecgroupId>
    <artifactId>commons-codecartifactId>
    <version>1.9version>
  dependency>
  dependencies>
  <profiles>
    
    <profile>
      
      <id>liantiaoid>
      <properties>
        <profiles.active>liantiaoprofiles.active>
      properties>
      <activation>
        <activeByDefault>trueactiveByDefault>
      activation>
    profile>
    <profile>
      
      <id>begintestid>
      <properties>
        <profiles.active>begintestprofiles.active>
      properties>
    profile>
  profiles>
  <build>
    <finalName>MvnDemofinalName>
    <plugins>
      <plugin>
        <groupId>org.mybatis.generatorgroupId>
        <artifactId>mybatis-generator-maven-pluginartifactId>
        <version>1.3.2version>
        <configuration>
          <verbose>trueverbose>
          <overwrite>trueoverwrite>
        configuration>
      plugin>
    plugins>
    <resources>
      <resource>
        <directory>src/main/conf/${profiles.active}directory>
      resource>
      <resource>
        <directory>src/main/javadirectory>
        <includes>
          <include>**/*.xmlinclude>
        includes>
      resource>
    resources>
  build>
project>

2、oracle数据库配置

<dependency>
    <groupId>com.oraclegroupId>
    <artifactId>ojdbc6artifactId>
    <version>11.2.0version>
dependency>

3、更新pom.xml后,记得使用maven更新一下项目
maven新建ssm项目中pom.xml文件内容_第1张图片
4、我本地装的是oracle ,在我将MySQL更换成oracle后总是报错
后来在网上搜到

mvn install:install-file -Dfile=ojdbc.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0 -Dpackaging=jar

还是不可以,后来更新maven后才可以,估计不用执行这,直接更新maven就可以了

你可能感兴趣的:(mybatis)