Google Application Engine Google App Engine GAE
<bean class="com.intersult.jsf2.PersistenceAnnotationBeanPostProcessor"/>
public class ObjectifyTest { private static LocalServiceTestHelper helper; @BeforeClass public static void setupClass() { LocalDatastoreServiceTestConfig config = new LocalDatastoreServiceTestConfig(); helper = new LocalServiceTestHelper(config); ObjectifyService.register(User.class); } @Before public void setUp() { helper.setUp(); } @After public void tearDown() { helper.tearDown(); } @Test public void test() { Objectify objectify = ObjectifyService.begin(); User user = objectify.find(User.class, 1); }
Um die Libs zur Verfügung zu stellen, wird das maven-war-plugin auf exploded umgestellt:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> <version>2.1.1</version> <configuration> <webResources> <resource> <directory>src/main/webapp</directory> <filtering>true</filtering> <includes> <include>**/appengine-web.xml</include> </includes> </resource> </webResources> </configuration> <executions> <execution> <phase>package</phase> <goals> <goal>exploded</goal> </goals> </execution> </executions> </plugin>