zoukankan      html  css  js  c++  java
  • 解决maven项目没有Maven Dependencies

    为了证明我还活着,今天就记录一下maven项目没有Maven Dependencies怎么解决

    一 在pom.xml配置这段代码设置远程仓库(个人推荐阿里的远程仓库)

    <repositories>
        <repository>
            <id>Dcm4Che</id>
            <name>Dcm4Che</name>
            <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>
    <parent>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-parent</artifactId>
            <version>2.0.0.RELEASE</version>
        </parent>
        <dependencies>
            <!-- -springboot 整合Web组件 整合SpringMVC 就会把传统方式的SpringMVC依赖的jar全部给下载来 -->
            <!-- 引入spring-boot-starter-web 帮你整合好所有相关的依赖jar包 原理 maven依赖传递 -->
    
            <!-- 原理: spring-boot-starter-parent< 中,整合号相关 jar依赖信息 -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-web</artifactId>
            </dependency>
            <!-- -springboot 整合Web组件 整合SpringMVC 就会把传统方式的SpringMVC依赖的jar全部给下载来 -->
            <!-- 引入spring-boot-starter-web 帮你整合好所有相关的依赖jar包 原理 maven依赖传递 -->
    
            <!-- 原理: spring-boot-starter-parent< 中,整合号相关 jar依赖信息 -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-web</artifactId>
            </dependency>
            <!-- 引入freeMarker的依赖包. -->
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-freemarker</artifactId>
            </dependency>
        </dependencies>

    二 maven → update project(ok)

  • 相关阅读:
    HTML 5 使用 FileReader、FormData实现文件上传
    【JS深入学习】——事件代理/事件委托
    【JS深入学习】——函数创建和重载
    Yii
    YII简单的基于角色的访问控制
    怎样在Yii中显示静态页
    Yii framework 应用总结小窍门(转)
    Yii PHP 框架分析(四)
    Yii PHP 框架分析(三)
    Yii PHP 框架分析(二)
  • 原文地址:https://www.cnblogs.com/money131/p/11145380.html
Copyright © 2011-2022 走看看