I am building a Google App Engine application using Spring 3.1 and I am having trouble getting members in one of my mailboxes.
I have three projects:
server
server.model
server.persistence
I have an ant build script, so when creating my workspace it creates jars for server.model
and server.persistence
and puts them in the correct lib directory for the server
project.
In server
I can auto-assure things from both server.model
and server.persistence
, but my server.persistence
beans are not connected to server.model
, although they are exactly the same as in server
.
fragment from my servlet application configuration:
<context:component-scan base-package="com.impersonal.server"/> <bean autowire="byType" id="appEngineDataStore" class="com.impersonal.server.persistance.AppEngineDataStore"/> <bean autowire="byType" id="userList" class="com.impersonal.server.model.UserList"/>
I have the following code in both the server
project and the server.model
project, and only the server is running. Here one does not work:
package com.impersonal.server.model; import java.util.ArrayList; import java.util.UUID; import org.springframework.beans.factory.annotation.Autowired; import com.impersonal.server.persistance.AppEngineDataStore; import com.impersonal.server.persistance.IDataStore; public class UserList extends ArrayList<User> { private UserList(){}
Edit: Just ran a test in the server.model
project, trying @Autowired that I did not define as a bean in my application configuration and did not receive any errors. I should have gotten a "bean found error" like me if I did the same for the server
project.
Any ideas why?
source share