错误原因

没有访问saveSkuSaleInfo(SkuSaleVo)的权限
使用了Security控制权限,访问时身份验证没有通过

修改

在被访问的微服务中添加SecurityConfig 配置

@Configuration
public class SecurityConfig extends WebSecurityConfigurerAdapter {

    @Override
    protected void configure(HttpSecurity http) throws Exception {
    	//允许任何请求访问
        //http.authorizeRequests().antMatchers("/**").permitAll();
        //设置指定路径放行
        http
            .authorizeRequests()
            .antMatchers("/index.html","login.html")
            .permitAll();
        // 禁用掉csrf
        http.csrf().disable();
    }
}
Logo

云原生社区为您提供最前沿的新闻资讯和知识内容

更多推荐