自定义域名
This commit is contained in:
parent
0b4604dd33
commit
ba54fa005e
|
|
@ -21,6 +21,8 @@ DyJava是一款功能强大的抖音Java开发工具包,支持多种抖音开
|
|||
``` yml
|
||||
dyjava:
|
||||
beanId:
|
||||
domain: https://open.douyin.com #自定义抖音域名,默认线上域名
|
||||
ttDomain: https://developer.toutiao.com #自定义头条域名,默认线上域名
|
||||
agents: #可配置多个应用
|
||||
- tenantId: 1 #租户名称
|
||||
clientKey: #应用Key
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.dyj.spring;
|
|||
|
||||
import com.dtflys.forest.config.ForestConfiguration;
|
||||
import com.dyj.common.config.DyConfiguration;
|
||||
import com.dyj.common.enums.DyAppletUrlPathEnum;
|
||||
import com.dyj.common.enums.DyWebUrlPathEnum;
|
||||
import com.dyj.common.handler.RequestHandler;
|
||||
import com.dyj.common.service.IAgentConfigService;
|
||||
|
|
@ -53,7 +54,6 @@ public class DyConfigurationRegister implements ResourceLoaderAware, BeanPostPro
|
|||
.setFactoryMethod("configuration")
|
||||
.addConstructorArgValue(id);
|
||||
|
||||
|
||||
BeanDefinition beanDefinition = beanDefinitionBuilder.getRawBeanDefinition();
|
||||
|
||||
BeanDefinitionRegistry beanFactory = (BeanDefinitionRegistry) applicationContext.getAutowireCapableBeanFactory();
|
||||
|
|
@ -97,6 +97,15 @@ public class DyConfigurationRegister implements ResourceLoaderAware, BeanPostPro
|
|||
for (DyWebUrlPathEnum value : DyWebUrlPathEnum.values()) {
|
||||
forestProperties.getVariables().put(value.getKey(), value.getValue());
|
||||
}
|
||||
for (DyAppletUrlPathEnum value : DyAppletUrlPathEnum.values()){
|
||||
forestProperties.getVariables().put(value.getKey(), value.getValue());
|
||||
}
|
||||
if(StringUtils.hasLength(dyConfigurationProperties.getDomain())){
|
||||
forestProperties.getVariables().put("domain", dyConfigurationProperties.getDomain());
|
||||
}
|
||||
if (StringUtils.hasLength(dyConfigurationProperties.getTtDomain())){
|
||||
forestProperties.getVariables().put("ttDomain", dyConfigurationProperties.getTtDomain());
|
||||
}
|
||||
forestConfiguration.setVariables(forestProperties.getVariables());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,6 +28,16 @@ public class DyConfigurationProperties {
|
|||
*/
|
||||
private Integer defaultId;
|
||||
|
||||
/**
|
||||
* 域名
|
||||
*/
|
||||
private String domain;
|
||||
|
||||
/**
|
||||
* 域名
|
||||
*/
|
||||
private String ttDomain;
|
||||
|
||||
/**
|
||||
* 应用配置
|
||||
*/
|
||||
|
|
@ -56,6 +66,22 @@ public class DyConfigurationProperties {
|
|||
this.beanId = beanId;
|
||||
}
|
||||
|
||||
public String getDomain() {
|
||||
return domain;
|
||||
}
|
||||
|
||||
public void setDomain(String domain) {
|
||||
this.domain = domain;
|
||||
}
|
||||
|
||||
public String getTtDomain() {
|
||||
return ttDomain;
|
||||
}
|
||||
|
||||
public void setTtDomain(String ttDomain) {
|
||||
this.ttDomain = ttDomain;
|
||||
}
|
||||
|
||||
public List<AgentConfiguration> getAgents() {
|
||||
return agents;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue