2017-11-30 13 views
0

from SPRING STSを使用しているときに@SpringBootApplicationが認識されません。私は新しいスプリングブートプロジェクトのスターターを作成しました。spring-boot-starter-parentバージョン1.5.9.RELEASE

をので、@SpringBootApplication - インポート

import org.springframework.boot.autoconfigure.SpringBootApplication; 

は(「輸入org.springframework.boot.autoconfigure.SpringBootApplicationが解決できない」私が取得)が認識されていない何らかの理由でプロジェクト

注釈も認識されない

package com.test; 

import org.springframework.boot.SpringApplication; 
import org.springframework.boot.autoconfigure.SpringBootApplication; 

    @SpringBootApplication 
    public class Newtest1sdfsdfApplication { 

     public static void main(String[] args) { 
      SpringApplication.run(Newtest1sdfsdfApplication.class, args); 
     } 
    } 

注:私は1.5.9から1.5に私は(のpom.xmlに)春ブート・スターター・親のプロジェクトのバージョンを変更した場合、自動的に

を作成されたプロジェクト を使用しています.8 - すべてが元気です。ここでの問題何

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

<parent> 
    <groupId>org.springframework.boot</groupId> 
    <artifactId>spring-boot-starter-parent</artifactId> 
    <version>1.5.8.RELEASE</version> 
    <relativePath/> <!-- lookup parent from repository --> 
</parent> 
に任意のアイデア:バック1.5.9に設定すると、エラー

意味がからに変化を示しますか?

+0

SO postの[this](https://stackoverflow.com/questions/6111408/maven2-missing-artifact-but-jars-are-in-place)の提案を試してみてください。私は言及されたバージョンで問題を見つけることができませんでした... –

答えて

0

私は終わった:

  1. サブフォルダを削除.m2フォルダ 内部からサブフォルダがあった。ORGCOM

  2. 右クリックプロジェクト名 - > MAVEN - >更新プロジェクト

関連する問題