首页 新闻 搜索 专区 学院

我 idea 2018 新建sring boot 项目maven上 都不能下载

0
悬赏园豆:5 [已解决问题] 解决于 2022-08-24 17:32

我 idea 2018 新建sring boot 项目maven上 都不能下载,都漂红,我用阿里镜像也没得,新建项目的Pom是这样的
<?xml version="1.0" encoding="UTF-8"?>
<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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>cn.stephen.study</groupId>
<artifactId>demoproject</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>demoproject</name>
<description>Demo project for Spring Boot</description>

<properties>
    <java.version>1.8</java.version>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <spring-boot.version>2.3.7.RELEASE</spring-boot.version>
</properties>

<dependencies>

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

    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-devtools</artifactId>
        <scope>runtime</scope>
        <optional>true</optional>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
        <exclusions>
            <exclusion>
                <groupId>org.junit.vintage</groupId>
                <artifactId>junit-vintage-engine</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
</dependencies>

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-dependencies</artifactId>
            <version>${spring-boot.version}</version>
            <type>pom</type>
            <scope>import</scope>
        </dependency>
    </dependencies>

</dependencyManagement>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <version>3.8.1</version>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
                <encoding>UTF-8</encoding>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <version>2.3.7.RELEASE</version>
            <configuration>
                <mainClass>cn.stephen.study.demoproject.DemoprojectApplication</mainClass>
            </configuration>
            <executions>
                <execution>
                    <id>repackage</id>
                    <goals>
                        <goal>repackage</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

</project>

superstar的主页 superstar | 菜鸟二级 | 园豆:265
提问于:2022-07-19 11:27
< >
分享
最佳答案
0

是不是maven有问题
打开idea,File->Settings 如下图,设置maven


新手推荐Springboot教程

收获园豆:5
智客工坊 | 小虾三级 |园豆:1540 | 2022-07-19 12:49



看有配置的

superstar | 园豆:265 (菜鸟二级) | 2022-07-19 14:34
其他回答(3)
0

网上搜一份settings,然后换一下应该就可以了

试试就试试111 | 园豆:202 (菜鸟二级) | 2022-07-19 15:42

https://www.cnblogs.com/lifan1998/p/10176833.html
我按这个示例做请求 localhost:8080/user/list 没有效果,是什么原因呢
显示:Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.

Tue Jul 19 15:45:48 CST 2022
There was an unexpected error (type=Not Found, status=404).
No message available

支持(0) 反对(0) superstar | 园豆:265 (菜鸟二级) | 2022-07-19 15:51
0

https://malian.tech/article/111805

参考下这个教程,是不是静态资源配置的不对

不会摇头的风扇 | 园豆:443 (菜鸟二级) | 2022-07-26 23:00
0

搞定了...

superstar | 园豆:265 (菜鸟二级) | 2022-08-24 17:31
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册