Merge branch 'master' into 5.0

# Conflicts:
#	doc/docs/files/10011_项目接入到SOP.md
#	pom.xml
#	sop-common/sop-bridge-nacos/pom.xml
#	sop-common/sop-service-common/pom.xml
This commit is contained in:
六如
2024-09-04 09:58:05 +08:00
80 changed files with 443 additions and 820 deletions

View File

@@ -2,7 +2,7 @@ package com.gitee.sop.websiteserver.bean;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;

View File

@@ -2,7 +2,7 @@ package com.gitee.sop.websiteserver.bean;
import com.gitee.sop.gatewaycommon.exception.ApiException;
import com.gitee.sop.gatewaycommon.message.ErrorMeta;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import java.util.function.Supplier;

View File

@@ -33,12 +33,12 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class WebsiteConfig implements WebMvcConfigurer, EnvironmentAware, ApplicationContextAware {
@Autowired
private RegistryListener registryListener;
private ApplicationContext applicationContext;
@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
SpringContext.setApplicationContext(applicationContext);
this.applicationContext = applicationContext;
}
@Override
@@ -88,7 +88,7 @@ public class WebsiteConfig implements WebMvcConfigurer, EnvironmentAware, Applic
*/
@EventListener(classes = HeartbeatEvent.class)
public void listenNacosEvent(ApplicationEvent heartbeatEvent) {
registryListener.onEvent(heartbeatEvent);
applicationContext.getBean(RegistryListener.class).onEvent(heartbeatEvent);
}
@Bean

View File

@@ -2,11 +2,8 @@ package com.gitee.sop.websiteserver.entity;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import com.gitee.fastmybatis.annotation.Pk;
import com.gitee.fastmybatis.annotation.Table;
import java.util.Date;
@@ -16,13 +13,10 @@ import java.util.Date;
*
* @author tanghc
*/
@Table(name = "isp_resource")
@Table(name = "isp_resource",pk = @Pk(name = "id"))
@Data
public class IspResource {
/** 数据库字段id */
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
/** 资源名称, 数据库字段name */

View File

@@ -2,11 +2,8 @@ package com.gitee.sop.websiteserver.entity;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import com.gitee.fastmybatis.annotation.Pk;
import com.gitee.fastmybatis.annotation.Table;
import java.util.Date;
@@ -16,12 +13,9 @@ import java.util.Date;
*
* @author tanghc
*/
@Table(name = "isv_info")
@Table(name = "isv_info",pk = @Pk(name = "id"))
@Data
public class IsvInfo {
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
/** 数据库字段id */
private Long id;

View File

@@ -2,11 +2,8 @@ package com.gitee.sop.websiteserver.entity;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import com.gitee.fastmybatis.annotation.Pk;
import com.gitee.fastmybatis.annotation.Table;
import java.util.Date;
@@ -16,12 +13,9 @@ import java.util.Date;
*
* @author tanghc
*/
@Table(name = "isv_keys")
@Table(name = "isv_keys",pk = @Pk(name = "id"))
@Data
public class IsvKeys {
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
/** 数据库字段id */
private Long id;

View File

@@ -2,11 +2,8 @@ package com.gitee.sop.websiteserver.entity;
import lombok.Data;
import javax.persistence.Column;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import com.gitee.fastmybatis.annotation.Pk;
import com.gitee.fastmybatis.annotation.Table;
import java.util.Date;
@@ -16,13 +13,10 @@ import java.util.Date;
*
* @author tanghc
*/
@Table(name = "user_account")
@Table(name = "user_account",pk = @Pk(name = "id"))
@Data
public class UserAccount {
/** 数据库字段id */
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
/** 用户名(邮箱), 数据库字段username */

View File

@@ -41,7 +41,7 @@ public class ServiceDocListener extends BaseServiceListener {
, instance.getIp() + ":" + instance.getPort())
);
} else {
log.error("加载文档失败, status:{}, body:{}", responseEntity.getStatusCodeValue(), responseEntity.getBody());
log.error("加载服务文档serviceId={}, 机器={}, status:{}, body:{}" , serviceId , instance.getIp() + ":" + instance.getPort(), responseEntity.getStatusCodeValue(), responseEntity.getBody());
}
}

View File

@@ -10,7 +10,7 @@ import com.gitee.sop.websiteserver.bean.DocModule;
import com.gitee.sop.websiteserver.bean.DocParameter;
import com.gitee.sop.websiteserver.bean.DocParserContext;
import com.google.common.collect.Sets;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.math.NumberUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.util.CollectionUtils;