Using spring mvc and the @ResponseBody annotation might give you the HttpMediaTypeNotAcceptableException if you set the "Accept" header to "application/json". To solve this, add jackson-jaxrs to your classpath. Nothing else needs to be done, spring does it's magic.
In your test , slap on a @Autowired on your AnnotationMethodHandlerAdapter.
Monday, February 14, 2011
Sunday, February 13, 2011
Maven + appengine
This memo is about using maven with your google appengine project.
Prerequisites:
Maven 3.0x
Command line interface
Know how to edit your pom
Howto:
Prerequisites:
Maven 3.0x
Command line interface
Know how to edit your pom
Howto:
- mvn archetype:generate choose gae-jsp and enter your project group/artifactid
- cd
- edit your pom.xml file to define at least the 1.4.2 version of google appengine, found under the properties tag.
1.4.2 - type mvn install to check that everything is ok
- type mvn gae:unpack to download and install the gae runtime into your local repository
- Edit the src/main/webapp/index.jsp, remove all jsp tags.
- type mvn gae:run and open localhost:8080
- mvn eclipse:eclipse and import the project into eclipse.
- Add spring, spring-mvc and spring-jdo or spring-jpa to your projects pom-file.
Update: updated version from 1.4.0 to 1.4.2
Subscribe to:
Posts (Atom)