Skip to content

发布与订阅 服务版本(Version)

ShenJW edited this page Apr 20, 2016 · 9 revisions
  • 作用
    允许客户端订阅接口签名与本地存根(Interface)一致, 但版本号(Version)不同的服务
     	@Service(version = "0.0.1-version")
     	public interface TestApp {
     	...
     	}
    
     	@Autowired(version = { "0.0.2-version" })
     	public class TestApp2Impl implements TestApp {
     	...
     	}
    
     	<bean id="test2" class="com.kepler.service.imported.ImportedServiceFactory" parent="kepler.service.imported.abstract">
     		<constructor-arg index="0" value="com.kepler.TestApp" />
     		<!-- Profile -->
     		<constructor-arg index="1" value="" />
     		<constructor-arg index="2" value="0.0.2-version" />
     		<!-- Catalog -->
     		<constructor-arg index="3" value="" />
     	</bean>
    
Clone this wiki locally