配置匿名用户URL

2019年12月27日 作者 刘剑

1. 其他工程, Controller 类使用 CoreVersion.PUBLIC_VERSION = “/public/v1″, shiro 不会拦截, 可以在工程间用 restTemplate 调用, 但不能使用session


@RestController
@RequestMapping(CoreVersion.PUBLIC_VERSION + "/hello")
public class PublicTestContoller {

2. eship-export-data 工程, 使用 EXPORT_PUBLIC_VERSION = "/export/public/v1"  就可以不被shiro拦截

@RestController
@RequestMapping(CoreVersion.EXPORT_PUBLIC_VERSION + "/hello")
public class PublicTestContoller {

 

3. 另外nginx所有server节点加

        location /export {
            proxy_pass http://export-data;
        }

 

4.  nginx并且添加 server 节点

   server {
        listen       80;
		server_name  ~^export\.(.+)?\.(com|com.cn|tech|cn)$;	
        location / {
            proxy_pass http://export-data;
        }
    }	

杀掉进程重启 taskkill /F /im nginx.exe

 

5.  添加配置 swithchhost

192.168.8.250 export.eship.com