2017-02-12 80 views
0

我想以編程方式重新啓動我的春季啓動應用程序結束點。以下是我用過的線。春季重啓結束點使用春天雲環境

public class FileWatcher { 
    @Autowired 
    private RestartEndpoint restartEndpoint; 

    public void onFileChange() { 
     Thread restartThread = new Thread(() -> restartEndpoint.restart()); 
     restartThread.setDaemon(false); 
     restartThread.start(); 
    } 
} 

但它會拋出下面的錯誤。

Error:(32, 64) java: cannot access org.springframework.boot.actuate.endpoint.AbstractEndpoint 
    class file for org.springframework.boot.actuate.endpoint.AbstractEndpoint not found 

我在做什麼錯在這裏?任何幫助將非常感激。

+0

你有驅動器啓動? – spencergibb

+0

抱歉沒有得到:(我是春天新手 – mayooran

回答