instruction
stringlengths
77
90.1k
/* * * * * * * Copyright (c) 2022 strongdata Authors. All Rights Reserved. * * * * * * http://www.strongdata.com.cn * * * */package com.strongdata.rill.core.security.server.service;import com.strongdata.rill.core.base.constant.CacheConstants;import lombok.SneakyThrows;import org.springframework.cache.annotation...
/* * * * * * * Copyright (c) 2022 strongdata Authors. All Rights Reserved. * * * * * * http://www.strongdata.com.cn * * * */package com.strongdata.rill.core.security.server.service;import org.springframework.beans.factory.InitializingBean;import org.springframework.security.authentication.AuthenticationManager;...
/* * * * * * * Copyright (c) 2022 strongdata Authors. All Rights Reserved. * * * * * * http://www.strongdata.com.cn * * * */package com.strongdata.rill.core.security.server.token;import com.strongdata.rill.core.base.util.SpringContextHolder;import com.strongdata.rill.core.security.server.token.store.redis.RillR...
/* * * * * * * Copyright (c) 2022 strongdata Authors. All Rights Reserved. * * * * * * http://www.strongdata.com.cn * * * */package com.strongdata.rill.core.security.server.token;import com.strongdata.rill.core.base.constant.CacheConstants;import com.strongdata.rill.core.security.server.token.store.redis.RillRe...
/* * * * * * * Copyright (c) 2022 strongdata Authors. All Rights Reserved. * * * * * * http://www.strongdata.com.cn * * * */package com.strongdata.rill.core.security.server.token.store.redis;import com.strongdata.rill.core.security.server.token.store.redis.serializer.json.FastJsonSerializationStrategy;import or...
package com.strongdata.rill.core.security.server.token.store.redis.serializer.json;import com.alibaba.fastjson.JSONObject;import com.alibaba.fastjson.parser.DefaultJSONParser;import com.alibaba.fastjson.parser.deserializer.ObjectDeserializer;import org.springframework.security.oauth2.common.DefaultOAuth2RefreshToken;im...
package com.strongdata.rill.core.security.server.token.store.redis.serializer.json;import com.alibaba.fastjson.JSON;import com.alibaba.fastjson.parser.ParserConfig;import com.alibaba.fastjson.serializer.SerializerFeature;import com.alibaba.fastjson.util.IOUtils;import com.alibaba.fastjson.util.TypeUtils;import com.stro...
package com.strongdata.rill.core.security.server.token.store.redis.serializer.json;import com.alibaba.fastjson.JSONObject;import com.alibaba.fastjson.TypeReference;import com.alibaba.fastjson.parser.DefaultJSONParser;import com.alibaba.fastjson.parser.Feature;import com.alibaba.fastjson.parser.deserializer.ObjectDeseri...
package com.strongdata.rill.core.security.util;import cn.hutool.core.net.URLDecoder;import cn.hutool.crypto.Mode;import cn.hutool.crypto.Padding;import cn.hutool.crypto.symmetric.AES;import org.apache.commons.codec.binary.Base64;import org.springframework.util.Base64Utils;import javax.crypto.KeyGenerator;import javax.c...
/* * * * * * * Copyright (c) 2022 strongdata Authors. All Rights Reserved. * * * * * * http://www.strongdata.com.cn * * * */package com.strongdata.rill.core.security.util;import cn.hutool.core.codec.Base64;import cn.hutool.core.util.CharsetUtil;import lombok.SneakyThrows;import lombok.experimental.UtilityClass;...
package com.strongdata.rill.core.security.util;import org.jasypt.encryption.pbe.StandardPBEStringEncryptor;import org.jasypt.salt.RandomSaltGenerator;public class PBEStringEncryptorTest { public static void main(String[] args) { StandardPBEStringEncryptor encryptor=new StandardPBEStringEncryptor(); enc...
/* * * * * * * Copyright (c) 2022 strongdata Authors. All Rights Reserved. * * * * * * http://www.strongdata.com.cn * * * */package com.strongdata.rill.core.security.util;import cn.hutool.core.util.StrUtil;import com.strongdata.rill.core.base.constant.SecurityConstants;import com.strongdata.rill.core.security.R...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not u...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not u...
package com.chinatower.product.monitoring.common;import java.text.ParseException;import java.text.SimpleDateFormat;import java.util.Calendar;import java.util.Date;import java.util.HashMap;import java.util.Map;public class DateUtils { /** * 时间转换 +8个小时 UTC->CST * * @param UTCStr * @param format * @...
package com.chinatower.product.monitoring.common;/** * 记录业务交易日志 * @author hp * */public class InterfaceLogUtil { public static String reqTransLog(String body) { return new StringBuffer("REQ").append("#\n").append(body).toString(); } public static String rspTransLog(String body) { return new StringBuffer("RSP").append...
package com.chinatower.product.monitoring.common;import com.alibaba.fastjson.JSON;import com.alibaba.fastjson.JSONObject;import com.chinatower.product.monitoring.entity.KafkaDto;import com.chinatower.product.monitoring.mapper.KafkaMonitorMapper;import lombok.extern.slf4j.Slf4j;import org.apache.commons.lang3.StringUtil...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not u...
package com.chinatower.product.monitoring.common;import com.alibaba.fastjson.JSON;import com.alibaba.fastjson.JSONObject;import com.chinatower.product.monitoring.entity.RabbitMQLog;import com.chinatower.product.monitoring.entity.RabbitmqLogEs;import com.chinatower.product.monitoring.response.ResultPage;import lombok.ex...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not u...
package com.chinatower.product.monitoring.common;import com.alibaba.fastjson.JSON;import com.alibaba.fastjson.JSONObject;import com.chinatower.product.monitoring.entity.RabbitMQLog;import com.chinatower.product.monitoring.entity.RabbitmqLogEs;import com.chinatower.product.monitoring.entity.RedisLog;import com.chinatowe...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not u...
package com.chinatower.product.monitoring.common;import com.alibaba.fastjson.JSON;import com.alibaba.fastjson.JSONObject;import com.chinatower.product.monitoring.common.trace.*;import com.chinatower.product.monitoring.entity.RabbitMQLog;import com.chinatower.product.monitoring.response.ResultPage;import com.google.comm...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not u...
package com.chinatower.product.monitoring.common;import com.alibaba.fastjson.JSON;import com.chinatower.product.monitoring.entity.*;import com.chinatower.product.monitoring.mapper.EurekaInstanceMapper;import com.google.common.util.concurrent.AtomicDouble;import io.micrometer.core.instrument.*;import kotlinx.coroutines....
package com.chinatower.product.monitoring.common.trace;import lombok.Getter;import lombok.Setter;import java.util.ArrayList;import java.util.List;@Getterpublic class BasicTrace { @Setter private String segmentId; private final List<String> endpointNames; @Setter private int duration; @Setter private Stri...
package com.chinatower.product.monitoring.common.trace;import java.lang.annotation.ElementType;import java.lang.annotation.Retention;import java.lang.annotation.RetentionPolicy;import java.lang.annotation.Target;@Target({ElementType.FIELD})@Retention(RetentionPolicy.RUNTIME)public @interface Column { String columnNa...
package com.chinatower.product.monitoring.common.trace;public enum Downsampling { None(0, ""), Second(1, "second"), Minute(2, "minute"), Hour(3, "hour"), Day(4, "day"), Month(5, "month"); private final int value; private final String name; Downsampling(int value, String name) { this.value = value; ...
package com.chinatower.product.monitoring.common.trace;import lombok.Data;import lombok.Getter;@Datapublic class Duration { private String start; private String end; private Step step;}
package com.chinatower.product.monitoring.common.trace;public class DurationPoint { private long point; private long secondsBetween; private long minutesBetween; public DurationPoint(long point, long secondsBetween, long minutesBetween) { this.point = point; this.secondsBetween = secondsBetwee...
package com.chinatower.product.monitoring.common.trace;import com.chinatower.product.monitoring.common.Const;import org.joda.time.DateTime;import java.text.ParseException;import java.text.SimpleDateFormat;import java.util.Date;import java.util.LinkedList;import java.util.List;public enum DurationUtils { INSTANCE; ...
package com.chinatower.product.monitoring.common.trace;public enum Function { None, Avg, Sum}
package com.chinatower.product.monitoring.common.trace;import lombok.Getter;import lombok.Setter;@Getter@Setterpublic class Pagination { private int pageNum; private int pageSize; private boolean needTotal;}
package com.chinatower.product.monitoring.common.trace;public enum PaginationUtils { INSTANCE; public Page exchange(Pagination paging) { int limit = paging.getPageSize(); int from = paging.getPageSize() * ((paging.getPageNum() == 0 ? 1 : paging.getPageNum()) - 1); return new Page(from, limit)...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not u...
package com.chinatower.product.monitoring.common.trace;public enum Step { MONTH, DAY, HOUR, MINUTE, SECOND}
package com.chinatower.product.monitoring.common.trace;import lombok.Getter;import lombok.Setter;import java.util.ArrayList;import java.util.List;@Getterpublic class TraceBrief { private final List<BasicTrace> traces; @Setter private int total; public TraceBrief() { this.traces = new ArrayList<>(); ...
package com.chinatower.product.monitoring.common.trace;import lombok.Data;import lombok.Getter;import lombok.Setter;@Datapublic class TraceQueryCondition { private String serviceId; private String serviceInstanceId; private String traceId; private String endpointName; private String endpointId; privat...
/* * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not u...
package com.chinatower.product.monitoring.common.trace;public class UnexpectedException extends RuntimeException { public UnexpectedException(String message) { super(message); } public UnexpectedException(String message, Exception cause) { super(message, cause); }}
package com.chinatower.product.monitoring.service;import com.chinatower.product.monitoring.common.KafkaUtils;import com.chinatower.product.monitoring.entity.KafkaDto;import com.chinatower.product.monitoring.mapper.KafkaMonitorMapper;import com.chinatower.product.monitoring.response.ProcessResult;import lombok.extern.sl...
package com.chinatower.product.monitoring.service;import com.alibaba.fastjson.JSONObject;import com.chinatower.product.monitoring.api.RabbitmqMonitorAPI;import com.chinatower.product.monitoring.common.DateUtils;import com.chinatower.product.monitoring.common.RabbitMQUtils;import com.chinatower.product.monitoring.entity...
package com.chinatower.product.monitoring.service;import java.util.Calendar;import java.util.Date;import java.util.Map;import lombok.extern.slf4j.Slf4j;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.ui.ModelMap;import org.springframework.web.bind.annotation.RequestBody;import o...
package com.chinatower.product.monitoring.service;import io.jsonwebtoken.Claims;import io.jsonwebtoken.Jws;import java.util.List;import java.util.Map;import javax.servlet.http.HttpServletRequest;import lombok.extern.slf4j.Slf4j;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.web...
package com.chinatower.product.monitoring.service;import io.micrometer.core.instrument.Gauge;import io.micrometer.core.instrument.MeterRegistry;import java.io.BufferedInputStream;import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;import java.io.PrintWriter;import java.net.HttpURLC...
package com.chinatower.product.monitoring.service;import com.chinatower.product.monitoring.common.*;import com.chinatower.product.monitoring.common.trace.*;import com.chinatower.product.monitoring.entity.ServiceEndpointBean;import com.chinatower.product.monitoring.entity.SysProjectServiceBean;import com.chinatower.prod...
package com.chinatower.product.monitoring.service;import com.chinatower.product.monitoring.common.StatsUtils;import com.chinatower.product.monitoring.common.trace.*;import com.chinatower.product.monitoring.entity.*;import com.chinatower.product.monitoring.mapper.ServiceEndpointMapper;import io.jsonwebtoken.Claims;impor...
package cn.chinatowercom.emp.service;import java.util.List;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.http.MediaType;import org.springframework.stereotype.Service;import org.springframework.web.bind.annotation.GetMapping;import org.springframework.web.bind.annotation.PathVa...
package cn.chinatowercom.login.service;import java.util.List;import java.util.Map;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.util.DigestUtils;import org.springframework.util.StringUtils;import org.springframework.web.bind.annotation.PostMapping;import org.springframework.we...
package cn.chinatowercom.menu.service;import java.util.ArrayList;import java.util.List;import lombok.extern.slf4j.Slf4j;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.web.bind.annotation.PostMapping;import org.springframework.web.bind.annotation.RequestBody;import org.springfra...
package cn.chinatowercom.org.service;import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.util.Map;import cn.chinatowercom.client.interfaces.LowerPersonnelClient;import cn.chinatowercom.common.db.MapperService;import cn.chinatowercom.sysDict.model.SysDictModel;import cn.chinatowercom.sy...
package cn.chinatowercom.project.service;import cn.chinatowercom.project.dao.GitInfoDao;import cn.chinatowercom.project.model.GitInfoModel;import cn.chinatowercom.sysDict.dao.SysDictMapper;import cn.chinatowercom.sysDict.model.SysDictModel;import org.springframework.beans.factory.annotation.Autowired;import org.springf...
package cn.chinatowercom.project.service;import cn.chinatowercom.common.response.RespResult;import cn.chinatowercom.framework.annotation.CurrentUser;import cn.chinatowercom.framework.annotation.LoginRequired;import cn.chinatowercom.framework.jwt.JwtUtil;import cn.chinatowercom.framework.jwt.UserInfo;import cn.chinatowe...
package cn.chinatowercom.role.service;import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.util.Map;import java.util.UUID;import cn.chinatowercom.sysDict.service.SysDictService;import com.github.pagehelper.PageHelper;import com.github.pagehelper.PageInfo;import lombok.extern.slf4j.Slf4j...
package cn.chinatowercom.sysDict.service;import java.util.ArrayList;import java.util.List;import lombok.extern.slf4j.Slf4j;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.web.bind.annotation.GetMapping;import org.springframework.web.bind.annotation.PostMapping;import org.springf...
package cn.chinatowercom.sysDict.service;import cn.chinatowercom.sysDict.dao.SysDictMapper;import cn.chinatowercom.sysDict.model.SysDictModel;import org.apache.ibatis.annotations.Mapper;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Service;import java.util.List;@Ser...
package cn.chinatowercom.system.service;import io.jsonwebtoken.Claims;import io.jsonwebtoken.Jws;import java.util.ArrayList;import java.util.HashMap;import java.util.List;import java.util.Map;import java.util.UUID;import javax.servlet.http.HttpServletRequest;import lombok.extern.slf4j.Slf4j;import org.apache.commons.la...
package cn.chinatowercom.system.service;import cn.chinatowercom.common.response.RespResult;import cn.chinatowercom.framework.annotation.CurrentUser;import cn.chinatowercom.framework.annotation.LoginRequired;import cn.chinatowercom.framework.jwt.UserInfo;import cn.chinatowercom.system.dao.ImageDao;import cn.chinatowerco...
package cn.chinatowercom.system.service;import cn.chinatowercom.system.dao.SysEmpProjectRelDao;import cn.chinatowercom.system.model.SysEmpProjectRel;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.stereotype.Service;import java.util.List;@Servicepublic class SysEmpProjectRelServ...
package cn.chinatowercom.system.service;import cn.chinatowercom.common.response.RespResult;import cn.chinatowercom.framework.annotation.LoginRequired;import cn.chinatowercom.system.dao.VersionDao;import lombok.extern.slf4j.Slf4j;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.we...
package cn.chinatowercom.common.config;import org.springframework.boot.web.servlet.FilterRegistrationBean;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import org.springframework.web.cors.CorsConfiguration;import org.springframework.web.cors.UrlBasedCorsC...
package cn.chinatowercom.common.config;import org.springframework.context.annotation.Configuration;import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;@Configurationpublic class SecurityConfig extends WebMvcConfigurerAdapter {// @Autowired// private SecurityInterceptor securityInterce...
package cn.chinatowercom.common.config;import org.springframework.context.annotation.Bean;import org.springframework.context.annotation.Configuration;import springfox.documentation.builders.ApiInfoBuilder;import springfox.documentation.builders.PathSelectors;import springfox.documentation.builders.RequestHandlerSelecto...
package cn.chinatowercom.common.db;import org.springframework.stereotype.Repository;import tk.mybatis.mapper.common.Mapper;@Repositorypublic interface MapperDao extends Mapper<SchemaColumns> {}
package cn.chinatowercom.common.db;import lombok.extern.slf4j.Slf4j;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.boot.SpringApplication;import org.springframework.boot.autoconfigure.SpringBootApplication;import org.springframework.context.ApplicationContext;import org.springf...
package cn.chinatowercom.common.db;import lombok.Data;import javax.persistence.Column;import javax.persistence.Table;@Data@Table(name = "information_schema.COLUMNS")public class SchemaColumns { @Column(name = "table_schema") private String tableSchema; @Column(name = "table_name") private String tableName; ...
package cn.chinatowercom.common.db;import lombok.Data;import javax.persistence.Column;import javax.persistence.Table;@Data@Table(name = "sys_code_details")public class SysCodeDetails { @Column(name = "id") private Long id; @Column(name = "code_category") private String codeCategory; @Column(name = "codin...
package cn.chinatowercom.common.db;import org.springframework.stereotype.Repository;import tk.mybatis.mapper.common.Mapper;@Repositorypublic interface SysCodeDetailsDao extends Mapper<SysCodeDetails> {}
package cn.chinatowercom.common.db;import lombok.Data;import javax.persistence.Column;import javax.persistence.Table;@Data@Table(name = "sys_dict")public class SysDict { @Column(name = "item_id") private Long item_id; @Column(name = "item_type") private String itemType; @Column(name = "item_type_name") ...
package cn.chinatowercom.common.db;import org.springframework.stereotype.Repository;import tk.mybatis.mapper.common.Mapper;@Repositorypublic interface SysDictDao extends Mapper<SysDict> {}
package cn.chinatowercom.common.exception;import cn.chinatowercom.common.response.RespResult;import lombok.extern.slf4j.Slf4j;import org.springframework.web.bind.annotation.ControllerAdvice;import org.springframework.web.bind.annotation.ExceptionHandler;import org.springframework.web.bind.annotation.ResponseBody;@Slf4j...
package cn.chinatowercom.common.response;import io.swagger.annotations.ApiModel;import io.swagger.annotations.ApiModelProperty;import lombok.Data;@Data@ApiModel("API返回消息体")public class RespResult { @ApiModelProperty(value = "API接口是否调用成功", notes = "SUCCESS调用成功 FAILED调用失败") private String status = "SUCCESS"; @Ap...
package cn.chinatowercom.common.security.dao;import cn.chinatowercom.common.security.model.UserToken;import org.springframework.stereotype.Repository;import tk.mybatis.mapper.common.Mapper;@Repositorypublic interface UserTokenDao extends Mapper<UserToken> {}
package cn.chinatowercom.common.security.model;import lombok.Data;import org.hibernate.annotations.DynamicUpdate;import javax.persistence.Column;import javax.persistence.Entity;import javax.persistence.Id;import javax.persistence.Table;@Data@Entity@Table(name="emall_mb_user_token")public class UserToken { @Id @Co...
package cn.chinatowercom.common.security;import lombok.extern.slf4j.Slf4j;import org.springframework.stereotype.Component;import org.springframework.web.servlet.HandlerInterceptor;import org.springframework.web.servlet.ModelAndView;import javax.servlet.http.HttpServletRequest;import javax.servlet.http.HttpServletRespon...
package cn.chinatowercom.common.security.service;import lombok.extern.slf4j.Slf4j;import org.springframework.web.bind.annotation.RestController;@Slf4j@RestControllerpublic class UserTokenService {}
package cn.chinatowercom.common.util;/**静态常量定义*/public class Constant { /**角色定义CODE:质量经理*/ public static final String SYS_ROLE_CODE_QA_MANAGER="1"; /**角色定义CODE:测试组长*/ public static final String SYS_ROLE_CODE_TEST_LEADER="15"; /**角色定义CODE:研发组长*/ public static final String SYS_ROLE_CODE_DEV_LEADER="6"; /**角色定义CODE:验收测试用例...
package cn.chinatowercom.common.util.email;import java.util.Map;public class EmailContent { /**是否使用模板*/ private boolean useTemp=true; /**模板名称(dode?)*/ private String tempName; /**模板值*/// private Map<String,Object> tempValue; private String tempValue; public EmailContent(boolean useTemp,String tempName,Map<String,Object...
package cn.chinatowercom.common.util.email;import java.util.Map;import org.apache.commons.lang3.StringUtils;import com.alibaba.fastjson.JSONObject;import cn.chinatowercom.common.response.RespResult;import cn.chinatowercom.common.util.http.HttpClientUtil;import lombok.extern.slf4j.Slf4j;@Slf4jpublic class EmailService {...
package cn.chinatowercom.common.util.email;import lombok.Data;/**发送邮件参数*/@Datapublic class EmailVo { /**发件人姓名*/ private String addName; /**发件人邮箱*/ private String addEmail; /**发件人凭证*/ private String addPwd; /**发件人服务器地址*/ private String addServer; /**是否使用ssl加密*/ private int isSSL=0; /**接收人姓名*/ private String receiveName;...
package cn.chinatowercom.common.util;import com.sun.org.apache.xerces.internal.impl.dv.util.Base64;import javax.crypto.Cipher;import javax.crypto.KeyGenerator;import javax.crypto.SecretKey;import javax.crypto.spec.SecretKeySpec;import java.security.SecureRandom;public class EncryptUtil { public static final String DES ...
package cn.chinatowercom.common.util.enums;public enum DevelopTaskType { DEV("DEV", "研发任务"), //流水线任务类型:研发 DEV_CODING("coding", "研发任务"),//(分配到责任人的末端研发任务,来自研发平台) TEST("TEST", "测试任务"), //流水线任务类型:测试 T("T", "测试任务"), //(分配到责任人的末端测试任务,来自测试平台) T_CASE_DESIGN("t_case_design", "用例编制"), //(分配到责任人的末端测试任务:单元测试用例编制) T_CASE_RUN("t_cas...
package cn.chinatowercom.common.util.enums;import org.apache.commons.lang3.StringUtils;public enum ProjectType { JAR("1", "微服务","jar"), VUE("2", "VUE前端项目","tar"), WAR("3", "WEB项目","war"); private String code; private String name; private String targetType; /**根据项目类型code获取打包类型*/ public static String getTargetTypeByCode(...
package cn.chinatowercom.common.util.enums;/**测试平台环节命名称*/public enum TestPlatformLinkName { CASE_DESIGN("1","用例"),CASE_RUN("2","执行"); private String code; private String name; private TestPlatformLinkName(String code,String name) { this.code = code; this.name = name; } public String getCode() { return code; } public...
package cn.chinatowercom.common.util.http;import java.io.IOException;import java.util.Map;import org.apache.http.HttpEntity;import org.apache.http.client.methods.CloseableHttpResponse;import org.apache.http.client.methods.HttpGet;import org.apache.http.client.methods.HttpPost;import org.apache.http.entity.StringEntity;...
package cn.chinatowercom.common.util;import io.kubernetes.client.apis.*;public class KubeApi { public ApisApi ApisApi(){ return new ApisApi(); } public AppsApi AppsApi() { return new AppsApi(); } public AppsV1Api AppsV1Api() { return new AppsV1Api(); } public AppsV1beta1Api AppsV1beta1Ap...
//package cn.chinatowercom.common.util;////import com.sun.jersey.api.client.Client;//import com.sun.jersey.api.client.WebResource;//import com.sun.jersey.api.client.config.DefaultClientConfig;//import com.sun.jersey.client.urlconnection.URLConnectionClientHandler;//import lombok.extern.slf4j.Slf4j;////import javax.ws.r...
package cn.chinatowercom.common.util;import cn.chinatowercom.framework.jwt.UserInfo;import cn.chinatowercom.framework.util.PortalConst;import org.springframework.web.context.request.RequestContextHolder;import org.springframework.web.context.request.ServletRequestAttributes;import javax.servlet.http.HttpServletRequest;...
package cn.chinatowercom.framework.annotation;import java.lang.annotation.ElementType;import java.lang.annotation.Retention;import java.lang.annotation.RetentionPolicy;import java.lang.annotation.Target;@Target({ElementType.PARAMETER})@Retention(RetentionPolicy.RUNTIME)public @interface CurrentUser {}
package cn.chinatowercom.framework.annotation;import java.lang.annotation.ElementType;import java.lang.annotation.Retention;import java.lang.annotation.RetentionPolicy;import java.lang.annotation.Target;@Target({ElementType.METHOD})@Retention(RetentionPolicy.RUNTIME)public @interface LoginRequired {}
package cn.chinatowercom.framework;import lombok.extern.slf4j.Slf4j;import org.apache.http.impl.client.CloseableHttpClient;import org.apache.http.impl.client.HttpClientBuilder;import org.springframework.beans.factory.annotation.Value;import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;import org....
package cn.chinatowercom.framework.intercepter;import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;public class FastJsonHttpMessageConverterEx extends FastJsonHttpMessageConverter { public FastJsonHttpMessageConverterEx() { // } @Override protected boolean supports(Class<?> clazz)...
package cn.chinatowercom.framework.intercepter;import cn.chinatowercom.common.util.UserUtil;import cn.chinatowercom.framework.jwt.UserInfo;import cn.chinatowercom.framework.util.PortalConst;import lombok.extern.slf4j.Slf4j;import org.springframework.stereotype.Component;import feign.RequestInterceptor;import feign.Requ...
package cn.chinatowercom.framework.intercepter;import cn.chinatowercom.client.sys.LoginClient;import cn.chinatowercom.client.sys.UserModel;import com.fasterxml.jackson.databind.ObjectMapper;import cn.chinatowercom.framework.annotation.LoginRequired;import cn.chinatowercom.framework.jwt.JwtUtil;import cn.chinatowercom.f...
package cn.chinatowercom.framework.intercepter;import cn.chinatowercom.framework.annotation.CurrentUser;import cn.chinatowercom.framework.jwt.UserInfo;import cn.chinatowercom.framework.util.PortalConst;import org.springframework.core.MethodParameter;import org.springframework.stereotype.Component;import org.springframe...
package cn.chinatowercom.framework;import cn.chinatowercom.framework.intercepter.FastJsonHttpMessageConverterEx;import cn.chinatowercom.framework.intercepter.TokenIntercepter;import cn.chinatowercom.framework.intercepter.UserMethodArgumentResolver;import org.springframework.context.annotation.Bean;import org.springfram...
package cn.chinatowercom.framework.jwt;import cn.chinatowercom.framework.util.PortalConst;import io.jsonwebtoken.Claims;import io.jsonwebtoken.Jws;import io.jsonwebtoken.Jwts;import io.jsonwebtoken.SignatureAlgorithm;import io.jsonwebtoken.impl.crypto.MacProvider;//import lombok.extern.slf4j.Slf4j;import org.apache.com...
package cn.chinatowercom.framework.jwt;import lombok.Data;@Datapublic class UserInfo { private String userId; private String userType; private String token; private String desc; private String userName; private String roleCode; private String roleName; private String orgId; private String org...
package cn.chinatowercom.framework.model;import cn.chinatowercom.framework.util.Op;import lombok.Data;import org.hibernate.validator.constraints.NotEmpty;import javax.validation.constraints.NotNull;@Datapublic class AdminModel { @NotNull(message = "管理员ID不能为空",groups = {Op.UPDATE.class}) private Long adminId; ...
package cn.chinatowercom.framework.util;import java.text.ParseException;import java.text.SimpleDateFormat;import java.util.*;import org.apache.commons.lang3.StringUtils;/** * 日期工具类 */public class DateUtils { /**yyyy-MM-dd*/ public static final String DATE_FROMAT_COMMON="yyyy-MM-dd"; /**yyyyMMdd*/ public static final St...