# AuthServer 服务说明

# 应用服务(后端)

# hrx-system模块

# hrx-admin模块

/************************************授权服务*************************************/
@Resource
private WebSocket webSocket;
@Autowired
private LicenseApplication licenseApplication;

@Scheduled(cron = "0 0 1 * * ?")
public void licenseGenerator() {
    licenseApplication.generator(false);
}

@Scheduled(cron = "*/5 * * * * ?")
public void pushLicenseGenerator() {
    try {
        JSONObject json = licenseApplication.pushGenerator();
        webSocket.sendInfo(JSONObject.toJSONString(json), "generator");
    }catch (Exception e){
        log.info("推送授权数据异常", e);
        e.printStackTrace();
    }
}
  • # application.xml 中添加以下代码
license:
  # appid授权服务端分配
  appid: 99f518bf-bae7-465d-bf82-0224f702fd92
  # license.lic授权服务端分配,放在应用服务器指定文件夹下
  path: C:/ProgramData/LicenseKey/license.lic

# hrx-framework模块

.antMatchers("/license/generator").anonymous()

# 应用服务(前端)