Google Eclipse 플러그인을 사용하여 GWT + GAE/Java를 사용하여 웹 페이지를 개발합니다. 로컬 GWT 코드로 localhost에서 디버깅하고 싶지만 실제 배포 된 웹 페이지에서 데이터베이스를 사용하고 싶습니다.배포 된 데이터베이스를 사용하여 로컬 호스트에서 디버그
가능합니까?
Google Eclipse 플러그인을 사용하여 GWT + GAE/Java를 사용하여 웹 페이지를 개발합니다. 로컬 GWT 코드로 localhost에서 디버깅하고 싶지만 실제 배포 된 웹 페이지에서 데이터베이스를 사용하고 싶습니다.배포 된 데이터베이스를 사용하여 로컬 호스트에서 디버그
가능합니까?
필터 RemoteServiceServlets 잘 작동하지 않습니다 그래서 당신의 RemoteServiceServlet에 추가 할 :
RemoteApiOptions options;
RemoteApiInstaller installer;
@Override
protected void onBeforeRequestDeserialized(String serializedRequest) {
if (getThreadLocalRequest().getRequestURL().indexOf("127.0.0.1") != -1) {
if (options == null) {
options = new RemoteApiOptions().server("example.appspot.com", 443).credentials("username",
"password");
installer = new RemoteApiInstaller();
try {
installer.install(options);
options.reuseCredentials("username", installer.serializeCredentials());
}
catch (IOException e) {
e.printStackTrace();
}
}
else {
installer = new RemoteApiInstaller();
try {
installer.install(options);
}
catch (IOException e) {
e.printStackTrace();
}
}
}
}
@Override
protected void onAfterResponseSerialized(String serializedResponse) {
if (getThreadLocalRequest().getRequestURL().indexOf("127.0.0.1") != -1)
installer.uninstall();
}
예, Google App Engine Remote API을 사용하여 프로덕션 데이터베이스에 연결할 수 있습니다. 정확히 똑같은 일을하는 Gealyk Remote Connector에서 영감을 얻을 수 있습니다. 예를 들어 Remote Connector Filter 소스 코드를 확인하십시오. 기본적으로 당신은
chain.doFilter(request, response)
인터넷 연결에 따라 응용 프로그램이 느리고 시간이 초과 될 수 있음을주의하십시오.
musketyr을, 당신이 지금 어떤 제안을해야합니까? "OAuth 기반 인증은 App Engine에서 실행되는 클라이언트에 대해 지원되지 않습니다." "http://stackoverflow.com/questions/33815315/how-to-debug-server-code-in-eclipse-on-appengine-database-oauth- based-remote-a – lembas