增加接口服务

This commit is contained in:
shuzheng 2017-06-19 23:46:21 +08:00
parent e424387ba9
commit b0597ee595
4 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,9 @@
package com.zheng.ucenter.rpc.api;
/**
* upms系统接口
* Created by shuzheng on 2017/6/19.
*/
public interface UcenterApiService {
}

View File

@ -0,0 +1,14 @@
package com.zheng.ucenter.rpc.api;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* 降级实现UcenterApiService接口
* Created by shuzheng on 2017/6/19.
*/
public class UcenterApiServiceMock implements UcenterApiService {
private static Logger _log = LoggerFactory.getLogger(UcenterApiServiceMock.class);
}

View File

@ -0,0 +1,19 @@
package com.zheng.ucenter.rpc.service.impl;
import com.zheng.ucenter.rpc.api.UcenterApiService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* UcenterApiService实现
* Created by shuzheng on 2017/6/19.
*/
@Service
@Transactional
public class UcenterApiServiceImpl implements UcenterApiService {
private static Logger _log = LoggerFactory.getLogger(UcenterApiServiceImpl.class);
}

View File

@ -33,4 +33,8 @@
<bean id="ucenterUserDetailsService" class="com.zheng.ucenter.rpc.service.impl.UcenterUserDetailsServiceImpl"/>
<dubbo:service interface="com.zheng.ucenter.rpc.api.UcenterUserDetailsService" ref="ucenterUserDetailsService" timeout="10000"/>
<!-- 接口服务 -->
<bean id="ucenterApiService" class="com.zheng.ucenter.rpc.service.impl.UcenterApiServiceImpl"/>
<dubbo:service interface="com.zheng.ucenter.rpc.api.UcenterApiService" ref="ucenterApiService" timeout="10000"/>
</beans>