GoogleCloudPlatform / gradle-appengine-plugin

Gradle plugin that provides tasks for uploading, running and managing Google App Engine projects
Apache License 2.0
236 stars 60 forks source link

spring 4 with local development server #271

Closed tsuncp closed 7 years ago

tsuncp commented 7 years ago
@RestController
@RequestMapping(value = "/test")
public class MainController {

    @RequestMapping(value = "/test", method = RequestMethod.GET)
    public String test() {
        return "success";
    }

    @RequestMapping(value = "/test2", method = RequestMethod.GET)
    public String test2() {
        return "success";
    }

}

if two method or more is defined in controller, server cannot started .. bad runtime process port , if there is only one method, no problem..

only exists in local development server, if deploy to app engine , it will work

dependencies :

compile 'javax.servlet:servlet-api:+' compile 'com.google.appengine:appengine:+' compile 'org.springframework:spring-core:+' compile 'org.springframework:spring-webmvc:+' compile 'com.google.firebase:firebase-admin:+'

tried using gretty as the local web server , it works

patflynn commented 7 years ago

Is this to App Engine Standard? Are you not using any of the emulated services that the dev appserver provides?

tsuncp commented 7 years ago

i found the solution..

i followed the different version before from this ... https://cloud.google.com/appengine/docs/java/tools/gradle

I now change to spring boot and the plugin here , it works now .. thanks