2016-09-25 3 views
0

저는 Play 프레임 워크에서 매우 새로운 기능입니다. 나는 아주 간단한 길을 추가 할 계획이다. 그러나 행동은 발견되지 않는다고 계속 말하고있다.Play Framework 2.5.x에서 경로를 추가하는 방법은 무엇입니까?

색인에서만 작동합니다. 발견되지

작업 :

enter image description here

내 Application.java :

public class Application extends Controller { 

    public Result index() { 
     return ok(index.render()); 
    } 

    public Result home() { 
     return ok(home.render()); 
    } 

} 

라우트 구성 파일 :

# Routes 
# This file defines all application routes (Higher priority routes first) 
# ~~~~ 


# Landing page 
GET  /        controllers.Application.index() 


GET   /home       controllers.Application.home() 


# Map the JS resource paths 
GET  /*file       controllers.Assets.versioned(path="/public", file: Asset) 

activator clean compile을 시도하지만 여전히 작동하지 않습니다 .

+0

당신은 모든 것을 시도 했습니까? –

+0

@DenisBarucic 예. 나는 그랬다. –

+0

응용 프로그램에 모듈이 설치되어 있습니까? 동일한 프로젝트에 많은 경로 파일이있을 수 있습니까? conf/routes에있는 파일인지, 다른 경로 파일에 있는지 확인하십시오. –

답변

0

그래서 여기 어떻게 고쳤습니다.

# Landing page 
GET  /        controllers.Application.index() 

#After entering username and password 
GET   /home         controllers.Application.home() 

route 명령 앞에 주석을 추가했습니다. 별난, 매우 이상합니다.

+0

좋은 신 ....... –

+0

@ALEX_AME 어떤 종류의 버그가 Play 프레임 워크에있을 수 있습니다. Play Framework의 문서에는이 내용이 언급되어 있지 않습니다. 그리고 연극 문서의 문제점은 따라하기가 매우 어렵다는 것입니다. –

+0

Play로 시작했을 때 템플릿이 많은 도움을주었습니다. 그 중 많은 예가 실제 예입니다. http://www.lightbend.com/activator/templates –

관련 문제