|
|
@@ -8,6 +8,8 @@ import lombok.Setter; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.context.annotation.Configuration; |
|
|
|
|
|
|
|
import javax.annotation.PostConstruct; |
|
|
|
|
|
|
|
/** |
|
|
|
* @program: gateway |
|
|
|
* @description: jwt设置 |
|
|
@@ -33,13 +35,10 @@ public class NettyServerConfig { |
|
|
|
private String starsAsycServerPort; |
|
|
|
|
|
|
|
private static NettyServerConfig nettyServerConfig; |
|
|
|
/** |
|
|
|
* spring会自动从ioc容器当中根据NettyServerConfig类型找到nettyServerConfig, |
|
|
|
* 当做参数传进来 |
|
|
|
* |
|
|
|
*/ |
|
|
|
@Autowired |
|
|
|
public void setNettyServerConfig(NettyServerConfig nettyServerConfig) { |
|
|
|
this.nettyServerConfig = nettyServerConfig; |
|
|
|
|
|
|
|
@PostConstruct |
|
|
|
public void init() { |
|
|
|
nettyServerConfig = this; |
|
|
|
} |
|
|
|
|
|
|
|
} |