spring整合flex
import java.util.List;
public interface MyService {
public List<MyEntity> getMyEntities();
}
Java服务的实现
Java代码
import java.util.ArrayList;
import java.util.List;
public class MyServiceImpl implements MyService {
public List<MyEntity> getMyEntities() {
List<MyEntity> list = new ArrayList<MyEntity>();
MyEntity entity = new MyEntity();
entity.setFirstName("Hello");
entity.setLastName("World");
entity.setEmailAddress("hello@");
list.add(entity);
MyEntity entity2 = new MyEntity();
entity2.setFirstName("Hello");
entity2.setLastName("Space");
entity2.setEmailAddress("hello@");
list.add(entity2);
MyEntity entity3 = new MyEntity();
entity3.setFirstName("Hello");
entity3.setLastName("Neighbor");
entity3.setEmailAddress("hello@");
list.add(entity3);
return list;
}
}
import java.util.ArrayList;
import java.util.List;
public class MyServiceImpl implements MyService {
public List<MyEntity> getMyEntities() {
List<MyEntity> list = new ArrayList<MyEntity>();
MyEntity entity = new MyEntity();
entity.setFirstName("Hello");
entity.setLastName("World");
entity.setEmailAddress("hello@");
list.add(entity);
MyEntity entity2 = new MyEntity();
entity2.setFirstName("Hello");
entity2.setLastName("Space");
entity2.setEmailAddress("hello@");