package com.gxwebsoft;

import com.gxwebsoft.common.core.security.JwtUtil;
import com.gxwebsoft.common.core.utils.DomainUtil;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

import static com.gxwebsoft.common.core.constants.DomainConstants.DOMAIN;

/**
 * Created by WebSoft on 2020-03-23 23:37
 */
@SpringBootTest
public class TestMain {

  /**
   * 生成唯一的key用于jwt工具类
   */
  @Test
  public void testGenJwtKey() {
    System.out.println(JwtUtil.encodeKey(JwtUtil.randomKey()));

    final String adminUrl = DomainUtil.getAdminUrl("10150");
    final String rootDomain = DomainUtil.getRootDomain();
    final String siteUrl = DomainUtil.getSiteUrl("10150");
    System.out.println("DOMAIN = " + DOMAIN);
    System.out.println("adminUrl = " + adminUrl);
    System.out.println("rootDomain = " + rootDomain);
    System.out.println("siteUrl = " + siteUrl);
  }

}
