access前端MySQL后端_基于SpringCloud+vue(ElementUI)+mySQL前后端分离设计之--搭建后台管理系统...

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

4.0.0

com.customer

customer

0.0.1-SNAPSHOT

jar

customer

customer project for Spring Boot

org.springframework.boot

spring-boot-starter-parent

1.5.6.RELEASE

UTF-8

UTF-8

1.8

Camden.SR6

com.server

beans

1.0-SNAPSHOT

org.springframework.cloud

spring-cloud-starter-config

org.springframework.boot

spring-boot-starter-security

org.springframework.cloud

spring-cloud-starter-eureka

org.springframework.boot

spring-boot-starter-websocket

org.springframework.boot

spring-boot-devtools

true

org.springframework.cloud

spring-cloud-starter-feign

org.springframework.boot

spring-boot-starter-actuator

org.springframework.cloud

spring-cloud-starter-eureka-server

org.springframework.boot

spring-boot-starter-test

test

mysql

mysql-connector-java

8.0.11

org.springframework.boot

spring-boot-starter-data-jpa

org.springframework.cloud

spring-cloud-dependencies

${spring-cloud.version}

pom

import

org.springframework.boot

spring-boot-maven-plugin

启动类

@SpringBootApplication

@EnableEurekaClient

@EnableDiscoveryClient

@EnableFeignClients

public class CustomerApplication {

public static void main(String[] args) {

SpringApplication.run(CustomerApplication.class, args);

}

}

使用权限管理系统服务类

@FeignClient(value = "AUS")

public interface AuthorityServer {

@RequestMapping(value = "/auth/login",method = RequestMethod.POST)

String loginAuthentication(@RequestBody UserEntity user);

@RequestMapping(value = "/auth/token",method = RequestMethod.GET)

String getResourceAuthentication(@RequestParam(value = ParameterNames.ACCESS_TOKEN) String token);

@RequestMapping(value = "/auth/sign",method = RequestMethod.POST)

String userSignIn(@RequestBody UserEntity user);

@RequestMapping(value = "/auth/update",method = RequestMethod.POST)

String userUpdate(@RequestBody UserEntity user);

@RequestMapping(value = "/api/verify",method = RequestMethod.GET)

String getResourcePermissions(@RequestParam(value = ParameterNames.ACCESS_TOKEN)String token,@RequestParam(ParameterNames.CODE) String app,@RequestParam(ParameterNames.PATH) String path);

}

》》例子:

"使用该类直接调方法传参就可以了"

@Autowired

private AuthorityServer authorityServer;

authorityServer.loginAuthentication(bean);

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值