Working with modules on a local dev server for Java

I am developing a Java Appengine Java application and before doing this I am facing serious testing for problems with my local dev server. I dumped the Eclipse tools because I am more flexible with Netbeans and I am using the Appengine Maven plugin for development.

This is my example project structure:

     module web
     module ear

The app works when I build from mvn clean install

in the root folder (myapp) and also when I use the command mvn appengine:devserver

to launch the module-ear app, however I cannot access the cloud endpoints via http://localhost:8080/_ah/api

. I can only access the endpoints API through the dynamically released port when I access it through the admin console http://localhost:8080/_ah/admin


The problem with this is that when testing a cloud Javascript client in a module-web project according to the tutorials, I have to use localhost:8080/_ah/api

as my url for testing. Did I miss something?


source to share

4 answers

If the question is still valid, you can always update your pom.xml with flags to define the ports of all your modules:



Then you can use localhost: 9090 / _ah / api / explorer to test your APIs



If you have multiple modules deployed, you need to update your maven program startup setting to recognize different modules. See Sample Java Application Sample at .

If you've already done so, then the dispatch.xml file will tell the application engine how to route requests:



It worked when I made the endpoints project a default module.



dispatch.xml is ignored on devserver, the documentation states the following.

File upload

All upload files are ignored when starting the development server. The only way to target instances is through their ports.

This means that only the default module (usually 8888 or 8080) can be accessed on the configured port. I just tested it with 1.9.25 app and it doesn't work, so there was no improvement.

On the other hand, you can always refer to a module by its port. The location of the module is logged to the console when the application starts, you will see something like:

INFO: Instance module module2-auto works with http://localhost:37251/

It was useless in my case as I expected to make AJAX requests for different modules using the same host (but different urls). For example:



All Articles