阅读背景:

在域模型中使用Spring依赖注入?

来源:互联网 

I have worked with Spring MVC for a while and think about to create an application with plain Spring (Spring Boot may be). I will have few domain data objects like: - Person - Address But first application version will be built without Address class. I do not know what fields will be stored in Address class. Also I want to make app with Hibernate (so Hibernate will create DB tables for instances classes). So I have options: -Create Person class at first, without address field, but it will be incomplete, and will need tests update when Address will be in system. -Create Address interface and make some implementation like MockAddress or StubAddress and create a data field in Person Class with Address interface type. -Create Address class without any interface and fields/methods and wire it with person.I have worked with Spring MVC for a while and t




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: