ava:软件包org.springframework.boot不存在

时间:2020-07-06 04:22:39

标签: java spring spring-boot

为什么要在intellij中运行一个简单的springboot项目这么大的事呢?

同一个问题也已经在前面讨论过,但是这些解决方案对我不起作用。因此,我提出了一个新问题。

IntelliJ IDEA 2020.1.2(社区版) Build#IC-201.7846.76,建于2020年6月1日

我已经使用spring initializr创建了一个简单的基于Maven的springboot项目 enter image description here

我的系统上安装了JDK 11。同一项目在Eclipse中可以正常工作。与intellij的关系是什么?为什么有时使它适用于简单的事情如此困难。

我的pom.xml

dict

错误日志

import requests
import pandas as pd


def get_team_matches_from_api(team: str) -> pd.DataFrame:
    "Get data from all matches played by :arg:`team`"
    
    # First, pull all teams from OpenDOTA so that we can...
    teams = pd.DataFrame(requests.get('https://api.opendota.com/api/teams').json())

    # ...get Team ID of :arg:`team`
    team_id = int(teams.team_id[teams.name.str.lower() == team.lower()])

    # Second, pull all games played by :arg:`team` so that we can...
    team_matches = requests.get(f'https://api.opendota.com/api/teams/{team_id}/matches').json()

    # ...get match IDs for each match played
    match_ids = [team_match['match_id'] for team_match in team_matches]

    # Third, go back to OpenDOTA and pull each match played by :arg:`team` using our match IDs above
    matches_data = []
    for match_id in match_ids:
        matches_data.append(requests.get(f'http://api.opendota.com/api/matches/{match_id}').json())

    # Fourth, put the data from the pulled matches into a `DataFrame`
    columns = ['match_id', 'duration', 'radiant_score', 'dire_score', 'radiant_gold_adv', 'radiant_xp_adv', 'radiant_team', 'dire_team', 'players', 'league', 'patch', 'start_time']
    df = pd.DataFrame(matches_data)[columns]

    return df.fillna('N/A')


def get_player_data_from_team_matches(team_matches: pd.DataFrame) -> dict:
    "Pull player data from all games in :arg:`team_matches`"
    
    players_from_team_matches = dict()

    for match_number in range(team_matches.players.shape[0]):

        for player_dict in team_matches.players[match_number]:
            if isinstance(player_dict, dict):
                df = pd.DataFrame({key: [value] for key, value in player_dict.items()})
                players_from_team_matches.update({match_number: df})

    return players_from_team_matches


# DataFrame of all Nigma matches
nigma = get_team_matches_from_api('nigma')

# Dictionary of all player data from every Nigma match
nigma_players = get_player_data_from_team_matches(nigma)

已下载外部库

enter image description here

Java主类

<?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>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.3.1.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.ps</groupId>
    <artifactId>conferenceo</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>conferenceo</name>
    <description>Demo project for Spring Boot</description>

<properties>
    <java.version>11</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>
        <exclusions>
            <exclusion>
                <groupId>org.junit.vintage</groupId>
                <artifactId>junit-vintage-engine</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

感谢您的帮助。

谢谢

0 个答案:

没有答案