SC Alibaba20211028 Nacos 微服务框架结构 SerivceImplMember
2、实例 SerivceImplMember
i)、api
ii)、impl
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
<version>2.2.2.RELEASE</version>
</dependency>
package com.sc.service.member.impl;
import com.sc.service.member.api.MemberService;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class MemberServiceImpl implements MemberService {
@Override
public String getUser(@RequestParam("useId") Integer useId) {
return "我是会员服务 userId:"+useId;
}
}
iii)、2009