zoukankan      html  css  js  c++  java
  • STS中依赖项的设置

    经过试验,把依赖项总结一下,可能会不断修改。

    1. 父依赖项(固定)

    <parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.1.8.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
    </parent>

    2. Web应用依赖项

    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    3. MySQL依赖项(缺省嵌入的tomcat,采用JDBC)

    <!--配置对MySQL的依赖 -->
    <dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    </dependency>

    <!--配置对MySQL的依赖-->
    <dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-jdbc</artifactId>
    </dependency>

    4. MyBatis依赖项

    <!--配置对mybatis的依赖项,这两个必须有,少一个就不能通过 -->
    <dependency>
    <groupId>org.mybatis.spring.boot</groupId>
    <artifactId>mybatis-spring-boot-starter</artifactId>
    <version>1.3.2</version>
    </dependency>

    <dependency>
    <groupId>org.mybatis</groupId>
    <artifactId>mybatis</artifactId>
    <version>3.4.4</version>
    </dependency>

  • 相关阅读:
    weblogic.xml
    LogAspect
    加注解时插入权限切面@EnableDataSecurity
    查询时根据权限更改sql
    web.xml
    log4j.properties
    jaxb解析xml
    sql 更新 批量更新 更新得到主键
    告诉maven,我真的不需要web.xml
    FLask中蓝图(用于分文件)
  • 原文地址:https://www.cnblogs.com/myboat/p/11508001.html
Copyright © 2011-2022 走看看