为了账号安全,请及时绑定邮箱和手机立即绑定

spring boot 项目运行报错

/ 猿问

spring boot 项目运行报错

至尊宝的传说 2019-05-19 14:38:13


使用IDEA创建的spring boot项目,目前是空项目,运行DemoApplication文件的时候,出现如下错误:


2019-05-16 17:36:41.215 INFO 22276 --- [ main] springboot02.demo.DemoApplication : Starting DemoApplication on lijinxiadeMacBook-Pro.local with PID 22276 (/data/yx/javacode/spring-boot-samples-master/demo/target/classes started by lijinxia in /data/yx/javacode/spring-boot-samples-master/demo)

2019-05-16 17:36:41.217 INFO 22276 --- [ main] springboot02.demo.DemoApplication : No active profile set, falling back to default profiles: default

2019-05-16 17:36:42.118 INFO 22276 --- [ main] springboot02.demo.DemoApplication : Started DemoApplication in 16.227 seconds (JVM running for 21.986)


application.properties 文件是空的

pom.xml文件的内容:

<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>

    <groupId>org.springframework.boot</groupId>

    <artifactId>spring-boot-starter-parent</artifactId>

    <version>2.1.5.RELEASE</version>

    <relativePath/> <!-- lookup parent from repository -->

</parent>

<groupId>springboot02</groupId>

<artifactId>demo</artifactId>

<version>0.0.1-SNAPSHOT</version>

<name>demo</name>

<description>Demo project for Spring Boot</description>


<properties>

    <java.version>1.8</java.version>

</properties>


<dependencies>

    <dependency>

        <groupId>org.springframework.boot</groupId>

        <artifactId>spring-boot-starter-web</artifactId>

    </dependency>


    <dependency>

        <groupId>org.springframework.boot</groupId>

        <artifactId>spring-boot-starter-test</artifactId>

        <scope>test</scope>

    </dependency>

</dependencies>


<build>

    <plugins>

        <plugin>

            <groupId>org.springframework.boot</groupId>

            <artifactId>spring-boot-maven-plugin</artifactId>

        </plugin>

    </plugins>

</build>

</project>


那这样看的话,是哪里出了问题那?


查看完整描述

2 回答

?
牧羊人nacy

原来是网路不好,在下载包的时候没下载完全,用mvn dependency:purge-local-repository
重新下载了,再运行就可以了

查看完整回答
反对 回复 2019-05-19
?
繁星coding

No active profile set, falling back to default profiles: default
这行么??这行是INFO级别,不是错误。

查看完整回答
反对 回复 2019-05-19

添加回答

回复

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信