com.diboot.devtools.v2.OO0O0OOOOO0O0O00 Maven / Gradle / Ivy
The newest version!
/**
* Copyright (c) dibo.ltd, https://www.dibo.ltd, https://www.diboot.com
*
* ---- 版权声明 ----
* Diboot相关商标、软件著作权、专利等全部知识产权隶属于苏州帝博信息技术有限公司。
* Diboot devtools 非开源项目,如您有devtools相关定制化需求,请至官网(https://www.dibo.ltd)联系帝博信息商务。
*
* 《中华人民共和国刑法》规定:破坏计算机信息系统罪,处五年以下有期徒刑或者拘役;后果特别严重的,处五年以上有期徒刑。
* 侵犯知识产权罪:处三年以下有期徒刑、拘役或管制,并处罚金;情节特别严重的,处三年以上七年以下有期徒刑,并处罚金。
*
* 任何尝试破解、破坏devtools、侵犯diboot知识产权的行为,我们将不惜一切代价追究到底!
*
*/
package com.diboot.devtools.v2;
import com.diboot.core.service.DictionaryServiceExtProvider;
import com.diboot.core.util.BeanUtils;
import com.diboot.core.util.ContextHelper;
import com.diboot.core.util.S;
import com.diboot.core.util.V;
import lombok.extern.slf4j.Slf4j;
import org.springframework.core.env.Environment;
import java.beans.BeanInfo;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.reflect.Method;
import java.util.HashMap;
import java.util.Map;
@Slf4j
@Deprecated()
public class OO0O0OOOOO0O0O00 {
private static OOOO00O0OO0O0O00 l1lll1lll1lll;
private static String llll1l1l11ll1 = "";
private static String l11111ll1ll11 = "";
public static final Map ll1ll11111l1ll = new HashMap<>(16);
public static final Map lllll1llll1ll1 = new HashMap<>(4);
@Deprecated()
public static void init(OOOO00O0OO0O0O00 lllll1lll111, Environment lll1l1lll111) {
l1lll1lll1lll = lllll1lll111;
if (V.isEmpty(l1lll1lll1lll.getOutputPath()) && V.isEmpty(l1lll1lll1lll.getOutputPathEntity())) {
log.warn(OOO0OO00O00O00OO.l11llll1ll11ll1("5pyq5qOA5rWL5Yiw5Luj56CB55Sf5oiQ6Lev5b6E6YWN572u77yM6K+35qOA5p+l6YWN572u5paH5Lu277yM6YWN572u56S65L6L77yaZGlib290LmRldnRvb2xzLm91dHB1dC1wYXRoKj1kaWJvb3QtZXhhbXBsZS9zcmMvbWFpbi9qYXZhL2NvbS9kaWJvb3QvZXhhbXBsZS8="));
}
l1ll1ll11l1l1(lllll1lll111);
l1l11llllllllll(lll1l1lll111);
for (O0O0O0000OO0O000.LYR l1111l11ll11 : O0O0O0000OO0O000.LYR.values()) {
String l111l111lll1 = OOO0OO00O00O00OO.l11llll1ll11ll1("b3V0cHV0UGF0aA==") + S.capFirst(S.toLowerCaseCamel(l1111l11ll11.name()));
if (!ll1ll11111l1ll.containsKey(l111l111lll1)) {
String llllll1l111l = llll11l1ll111l1(l1111l11ll11);
ll1ll11111l1ll.put(l111l111lll1, llllll1l111l);
}
}
}
@Deprecated()
public static void l1l11llllllllll(Environment l11ll11111l1) {
if (l11ll11111l1.getProperty(OOO0OO00O00O00OO.l11llll1ll11ll1("c2VydmVyLnNlcnZsZXQuY29udGV4dC1wYXRo")) != null) {
llll1l1l11ll1 = l11ll11111l1.getProperty(OOO0OO00O00O00OO.l11llll1ll11ll1("c2VydmVyLnNlcnZsZXQuY29udGV4dC1wYXRo"));
if ("/".equalsIgnoreCase(llll1l1l11ll1)) {
llll1l1l11ll1 = "";
}
}
if (l11ll11111l1.getProperty(OOO0OO00O00O00OO.l11llll1ll11ll1("c3ByaW5nLmFwcGxpY2F0aW9uLm5hbWU=")) != null) {
l11111ll1ll11 = l11ll11111l1.getProperty(OOO0OO00O00O00OO.l11llll1ll11ll1("c3ByaW5nLmFwcGxpY2F0aW9uLm5hbWU="));
}
}
@Deprecated()
public static String lll1111lll1l11l() {
return l11111ll1ll11;
}
@Deprecated()
private static void l1ll1ll11l1l1(OOOO00O0OO0O0O00 l1lll1l1l11l) {
String l1l1llll11l1 = OOO0O00O00O0OO0O.lll1ll1ll1ll1ll(OOO0O00O00O0OO0O.PT_TP.WORKSPACE);
try {
BeanInfo l11l1l1llll1 = Introspector.getBeanInfo(OOOO00O0OO0O0O00.class, Object.class);
for (PropertyDescriptor l11l11111111 : l11l1l1llll1.getPropertyDescriptors()) {
String lll1111lllll = l11l11111111.getDisplayName();
Method l1111l1l1ll1 = l11l11111111.getReadMethod();
Object lll1111l1l1l = l1111l1l1ll1.invoke(l1lll1l1l11l);
if (V.notEquals(l1111l1l1ll1.getReturnType().getTypeName(), String.class.getTypeName())) {
continue;
}
if (V.notEmpty(lll1111l1l1l) && lll1111l1l1l.toString().contains("/")) {
if (OOO0O00O00O0OO0O.ll111l111ll1ll1(lll1111l1l1l.toString())) {
ll1ll11111l1ll.put(lll1111lllll, lll1111l1l1l.toString());
} else {
ll1ll11111l1ll.put(lll1111lllll, l1l1llll11l1 + lll1111l1l1l);
}
}
}
} catch (Exception e) {
log.error(OOO0OO00O00O00OO.l11llll1ll11ll1("5Yid5aeL5YyW6Lev5b6E5aSx6LSl77yae30="), e.getMessage());
}
}
@Deprecated()
public static String llll11l1ll111l1(O0O0O0000OO0O000.LYR l1ll11l111l1) {
String l1l11111l11l = lllll11l11111ll(l1ll11l111l1);
return OOO0O00O00O0OO0O.llll11l1ll111l1(l1l11111l11l);
}
@Deprecated()
public static OOOO00O0OO0O0O00 l1lll1ll1111l1l() {
return l1lll1lll1lll;
}
@Deprecated()
public static String l1ll1lll1llll11() {
String ll1111llllll = l1lll1lll1lll.getCodesAuthor();
if (V.isEmpty(ll1111llllll)) {
ll1111llllll = "";
}
return ll1111llllll;
}
@Deprecated()
public static String ll111l111l11lll() {
String lll1l1l1l111 = l1lll1lll1lll.getCodesCopyright();
if (V.isEmpty(lll1l1l1l111)) {
lll1l1l1l111 = l1ll1lll1llll11();
}
return lll1l1l1l111;
}
@Deprecated()
public static String l1ll11111lll1l1() {
String l111ll11llll = l1lll1lll1lll.getCodesVersion();
if (V.isEmpty(l111ll11llll)) {
l111ll11llll = OOO0OO00O00O00OO.l11llll1ll11ll1("MS4w");
}
return l111ll11llll;
}
@Deprecated()
public static String llll11111l11111() {
return l1lll1lll1lll != null ? l1lll1lll1lll.getLicense() : null;
}
@Deprecated()
public static boolean lll111111111l11(String l1ll111lllll) {
try {
Class.forName(l1ll111lllll);
return true;
} catch (Exception e) {
return false;
}
}
@Deprecated()
public static boolean l1ll1ll1l1l11ll() {
return lll111111111l11(OOO0OO00O00O00OO.l11llll1ll11ll1("Y29tLmRpYm9vdC5pYW0uZW50aXR5LklhbVJvbGU="));
}
@Deprecated()
public static boolean l111l1ll1l1l1ll() {
return lll111111111l11(OOO0OO00O00O00OO.l11llll1ll11ll1("Y29tLmRpYm9vdC5maWxlLmVudGl0eS5VcGxvYWRGaWxl"));
}
@Deprecated()
public static boolean l1l1ll1lll11ll1() {
return lll111111111l11(OOO0OO00O00O00OO.l11llll1ll11ll1("Y29tLmRpYm9vdC5zY2hlZHVsZXIuZW50aXR5LlNjaGVkdWxlSm9i"));
}
@Deprecated()
public static boolean ll11lll11l11l11() {
return lll111111111l11(OOO0OO00O00O00OO.l11llll1ll11ll1("Y29tLmRpYm9vdC5tZXNzYWdlLmVudGl0eS5NZXNzYWdl"));
}
@Deprecated()
public static boolean ll1111l1l1l1lll() {
return lll111111111l11(OOO0OO00O00O00OO.l11llll1ll11ll1("Y29tLmRpYm9vdC5tb2JpbGUuZW50aXR5LklhbU1lbWJlcg=="));
}
@Deprecated()
public static String lll1l1l1lllll11() {
return null;
}
@Deprecated()
public static boolean lllll1l11l11111() {
return V.notEmpty(l1lll1lll1lll.getOutputPathBase());
}
@Deprecated()
public static String lllll11l11111ll(O0O0O0000OO0O000.LYR llllll111111) {
String l1l1l1ll11l1 = l1lll1lll1lll.getOutputPath();
String l1l1llllllll = null, llllll11l1ll = null;
boolean l1lll11lll11 = false;
switch(llllll111111) {
case BASE:
{
l1l1llllllll = l1lll1lll1lll.getOutputPathBase();
break;
}
case BASE_ENTITY:
{
l1l1llllllll = l1lll1lll1lll.getOutputPathBase();
if (V.isEmpty(l1l1llllllll)) {
l1l1llllllll = l1lll1lll1lll.getOutputPathEntity();
} else {
l1lll11lll11 = true;
}
llllll11l1ll = OOO0OO00O00O00OO.l11llll1ll11ll1("ZW50aXR5Lw==");
break;
}
case BASE_CONTROLLER:
{
l1l1llllllll = l1lll1lll1lll.getOutputPathBase();
if (V.isEmpty(l1l1llllllll)) {
l1l1llllllll = l1lll1lll1lll.getOutputPathController();
} else {
l1lll11lll11 = true;
}
llllll11l1ll = OOO0OO00O00O00OO.l11llll1ll11ll1("Y29udHJvbGxlci8=");
break;
}
case BASE_SERVICE:
{
l1l1llllllll = l1lll1lll1lll.getOutputPathBase();
if (V.isEmpty(l1l1llllllll)) {
l1l1llllllll = l1lll1lll1lll.getOutputPathService();
} else {
l1lll11lll11 = true;
}
llllll11l1ll = OOO0OO00O00O00OO.l11llll1ll11ll1("c2VydmljZS8=");
break;
}
case BASE_SERVICE_IMPL:
{
l1l1llllllll = l1lll1lll1lll.getOutputPathBase();
if (V.isEmpty(l1l1llllllll)) {
llllll11l1ll = OOO0OO00O00O00OO.l11llll1ll11ll1("c2VydmljZS9pbXBsLw==");
l1l1llllllll = l1lll1lll1lll.getOutputPathServiceImpl();
if (l1l1llllllll == null) {
l1l1llllllll = l1lll1lll1lll.getOutputPathService();
if (l1l1llllllll != null) {
if (!l1l1llllllll.endsWith("/")) {
l1l1llllllll += "/";
}
l1l1llllllll += OOO0OO00O00O00OO.l11llll1ll11ll1("aW1wbC8=");
llllll11l1ll = OOO0OO00O00O00OO.l11llll1ll11ll1("aW1wbC8=");
}
}
} else {
l1lll11lll11 = true;
llllll11l1ll = OOO0OO00O00O00OO.l11llll1ll11ll1("c2VydmljZS9pbXBsLw==");
}
break;
}
case BASE_EXCEL:
{
l1l1llllllll = l1lll1lll1lll.getOutputPathBase();
if (V.isEmpty(l1l1llllllll)) {
l1l1llllllll = l1lll1lll1lll.getOutputPathExcelHandle();
} else {
l1lll11lll11 = true;
}
llllll11l1ll = OOO0OO00O00O00OO.l11llll1ll11ll1("ZXhjZWwv");
break;
}
case HANDLER:
{
l1l1llllllll = l1lll1lll1lll.getOutputPathHandler();
if (l1l1llllllll == null) {
l1l1llllllll = l1lll1lll1lll.getOutputPathBase();
l1lll11lll11 = true;
}
llllll11l1ll = OOO0OO00O00O00OO.l11llll1ll11ll1("aGFuZGxlci8=");
break;
}
case ENTITY:
{
l1l1llllllll = l1lll1lll1lll.getOutputPathEntity();
llllll11l1ll = OOO0OO00O00O00OO.l11llll1ll11ll1("ZW50aXR5Lw==");
break;
}
case DTO:
{
l1l1llllllll = l1lll1lll1lll.getOutputPathDto();
llllll11l1ll = OOO0OO00O00O00OO.l11llll1ll11ll1("ZHRvLw==");
break;
}
case VO:
{
l1l1llllllll = l1lll1lll1lll.getOutputPathVo();
llllll11l1ll = OOO0OO00O00O00OO.l11llll1ll11ll1("dm8v");
break;
}
case CONTROLLER:
{
l1l1llllllll = l1lll1lll1lll.getOutputPathController();
llllll11l1ll = OOO0OO00O00O00OO.l11llll1ll11ll1("Y29udHJvbGxlci8=");
break;
}
case SERVICE:
{
l1l1llllllll = l1lll1lll1lll.getOutputPathService();
llllll11l1ll = OOO0OO00O00O00OO.l11llll1ll11ll1("c2VydmljZS8=");
break;
}
case SERVICE_IMPL:
{
l1l1llllllll = l1lll1lll1lll.getOutputPathServiceImpl();
llllll11l1ll = OOO0OO00O00O00OO.l11llll1ll11ll1("aW1wbC8=");
if (l1l1llllllll == null) {
l1l1llllllll = l1lll1lll1lll.getOutputPathService();
if (l1l1llllllll != null) {
if (!l1l1llllllll.endsWith("/")) {
l1l1llllllll += "/";
}
l1l1llllllll += OOO0OO00O00O00OO.l11llll1ll11ll1("aW1wbC8=");
}
llllll11l1ll = OOO0OO00O00O00OO.l11llll1ll11ll1("c2VydmljZS9pbXBsLw==");
}
break;
}
case MAPPER:
{
l1l1llllllll = l1lll1lll1lll.getOutputPathMapper();
llllll11l1ll = OOO0OO00O00O00OO.l11llll1ll11ll1("bWFwcGVyLw==");
break;
}
case MAPPER_XML:
{
l1l1llllllll = l1lll1lll1lll.getOutputPathMapperXml();
llllll11l1ll = OOO0OO00O00O00OO.l11llll1ll11ll1("bWFwcGVyLw==");
if (l1l1llllllll == null) {
l1l1llllllll = l1lll1lll1lll.getOutputPathMapper();
}
break;
}
case EXCEL:
{
l1l1llllllll = l1lll1lll1lll.getOutputPathExcelHandle();
llllll11l1ll = OOO0OO00O00O00OO.l11llll1ll11ll1("ZXhjZWwv");
break;
}
case VIEW:
{
l1l1llllllll = l1lll1lll1lll.getOutputPathAdminUi();
break;
}
case MOBILE_VIEW:
{
l1l1llllllll = l1lll1lll1lll.getOutputPathMobileUi();
break;
}
case SQL:
{
l1l1llllllll = l1lll1lll1lll.getOutputPathSql();
break;
}
default:
{
return null;
}
}
if (V.isEmpty(l1l1llllllll)) {
l1l1llllllll = l1l1l1ll11l1;
if (V.notEmpty(llllll11l1ll)) {
l1lll11lll11 = true;
}
}
if (l1l1llllllll != null && l1l1llllllll.contains("\\")) {
l1l1llllllll = S.replace(l1l1llllllll, "\\", "/");
}
if (l1l1llllllll != null && !l1l1llllllll.endsWith("/")) {
l1l1llllllll = l1l1llllllll + "/";
}
if (l1lll11lll11) {
l1l1llllllll += llllll11l1ll;
}
return l1l1llllllll;
}
@Deprecated()
public static boolean l1l1l1lll11lll1() {
DictionaryServiceExtProvider l11l1l1l1lll = ContextHelper.getBean(DictionaryServiceExtProvider.class);
if (l11l1l1l1lll == null) {
return false;
}
Class> l11llll1l111 = BeanUtils.getTargetClass(l11l1l1l1lll);
String l1l1ll1l1l1l = l11llll1l111.getName();
return l1l1ll1l1l1l.startsWith(OOO0OO00O00O00OO.l11llll1ll11ll1("Y29tLmRpYm9vdC5hcGk=")) || l1l1ll1l1l1l.startsWith(OOO0OO00O00O00OO.l11llll1ll11ll1("Y29tLmRpYm9vdC5jbG91ZA=="));
}
@Deprecated()
private static String l11l1l111ll11(String l1l111111ll1, String ll1lll11l1l1) {
if (l1l111111ll1.endsWith("/")) {
l1l111111ll1 = S.substringBeforeLast(l1l111111ll1, "/");
}
return S.substringBeforeLast(l1l111111ll1, "/") + "/" + ll1lll11l1l1;
}
private static O0OO00OOOO0OO0O0 lll1lllllll11 = null;
@Deprecated()
public synchronized static O0OO00OOOO0OO0O0 l11111l1ll1ll1l() {
if (lll1lllllll11 == null) {
lll1lllllll11 = new O0OO00OOOO0OO0O0();
lll1lllllll11.setAuthor(l1ll1lll1llll11()).setCodeVersion(l1ll11111lll1l1()).setCopyright(ll111l111l11lll()).setHasBasePath(V.notEmpty(l1lll1lll1lll.getOutputPathBase())).setEnableLombok(ll11l1l1111l1(l1lll1lll1lll.getEnableLombok(), OOO0OO00O00O00OO.l11llll1ll11ll1("bG9tYm9rLkRhdGE="))).setEnableSwagger(ll11l1l1111l1(l1lll1lll1lll.getEnableSwagger(), OOO0OO00O00O00OO.l11llll1ll11ll1("aW8uc3dhZ2dlci52My5vYXMuYW5ub3RhdGlvbnMuT3BlcmF0aW9u"))).setEnableDibootIam(l1ll1ll1l1l11ll()).setContextPath(llll1l1l11ll1).setApplicationName(l11111ll1ll11).setModulePathStrategy(l1lll1lll1lll.getModulePathStrategy().name());
}
return lll1lllllll11;
}
@Deprecated()
private static boolean ll11l1l1111l1(Boolean lllllll11ll1, String llll1ll1l11l) {
if (lllllll11ll1 != null) {
return lllllll11ll1.booleanValue();
}
return lll111111111l11(llll1ll1l11l);
}
@Deprecated()
public static String ll1l111l11l1lll(String l1llll1llll1, String l1111ll11l1l) {
l1llll1llll1 = l1llll1llll1.replaceAll("//", "/");
if (V.isEmpty(l1111ll11l1l)) {
return l1llll1llll1;
}
String l11lll1l1l1l = l11111l1ll1ll1l().getModulePathStrategy();
if (OOOO00O0OO0O0O00.ModuleStrategy.AfterLayer.name().equalsIgnoreCase(l11lll1l1l1l)) {
String l111l111111l = S.substringAfterLast(l1llll1llll1, "/");
l1llll1llll1 = S.substringBeforeLast(l1llll1llll1, "/") + "/" + l1111ll11l1l + "/" + (l111l111111l != null ? l111l111111l : "");
} else if (OOOO00O0OO0O0O00.ModuleStrategy.BeforeLayer.name().equalsIgnoreCase(l11lll1l1l1l)) {
if (l1llll1llll1.contains(OOO0OO00O00O00OO.l11llll1ll11ll1("L3NlcnZpY2U="))) {
l1llll1llll1 = S.substringBeforeLast(l1llll1llll1, OOO0OO00O00O00OO.l11llll1ll11ll1("L3NlcnZpY2U=")) + "/" + l1111ll11l1l + OOO0OO00O00O00OO.l11llll1ll11ll1("L3NlcnZpY2U=") + S.substringAfterLast(l1llll1llll1, OOO0OO00O00O00OO.l11llll1ll11ll1("L3NlcnZpY2U="));
} else {
String l111l111111l = S.substringAfterLast(l1llll1llll1, "/");
String l1ll1ll1l1l1 = S.substringBeforeLast(l1llll1llll1, "/");
String l1l11l1l111l = S.substringAfterLast(l1ll1ll1l1l1, "/");
l1llll1llll1 = S.substringBeforeLast(l1ll1ll1l1l1, "/") + "/" + l1111ll11l1l + "/" + l1l11l1l111l + "/" + l111l111111l;
}
}
return l1llll1llll1;
}
@Deprecated()
public static String l111l1111111lll(String ll111llll111) {
return ll1ll11111l1ll.get(ll111llll111);
}
@Deprecated()
public static String ll111ll1l1l111l(String lllll1llll1l) {
String l11111lll1l1 = l11111l1ll1ll1l().getEntityPackage();
if (V.isEmpty(lllll1llll1l)) {
return l11111lll1l1;
}
String lll1l1ll11l1 = l11111l1ll1ll1l().getModulePathStrategy();
if (OOOO00O0OO0O0O00.ModuleStrategy.AsNormal.name().equalsIgnoreCase(lll1l1ll11l1)) {
return l11111lll1l1;
} else if (OOOO00O0OO0O0O00.ModuleStrategy.AfterLayer.name().equalsIgnoreCase(lll1l1ll11l1)) {
return l11111lll1l1 + "." + lllll1llll1l;
} else if (OOOO00O0OO0O0O00.ModuleStrategy.BeforeLayer.name().equalsIgnoreCase(lll1l1ll11l1)) {
if (l11111lll1l1.contains(OOO0OO00O00O00OO.l11llll1ll11ll1("LnNlcnZpY2U="))) {
return S.substringBeforeLast(l11111lll1l1, OOO0OO00O00O00OO.l11llll1ll11ll1("LnNlcnZpY2U=")) + "." + lllll1llll1l + OOO0OO00O00O00OO.l11llll1ll11ll1("LnNlcnZpY2U=") + S.substringAfterLast(l11111lll1l1, OOO0OO00O00O00OO.l11llll1ll11ll1("LnNlcnZpY2U="));
} else {
return S.substringBeforeLast(l11111lll1l1, ".") + "." + lllll1llll1l + "." + S.substringAfterLast(l11111lll1l1, ".");
}
} else {
return l11111lll1l1;
}
}
@Deprecated()
public static String l111111ll1111ll(String l1l11ll111ll) {
String ll1ll1l111l1 = l11111l1ll1ll1l().getServicePackage();
if (V.isEmpty(l1l11ll111ll)) {
return ll1ll1l111l1;
}
String llll1ll11l11 = l11111l1ll1ll1l().getModulePathStrategy();
if (OOOO00O0OO0O0O00.ModuleStrategy.AsNormal.name().equalsIgnoreCase(llll1ll11l11)) {
return ll1ll1l111l1;
} else if (OOOO00O0OO0O0O00.ModuleStrategy.AfterLayer.name().equalsIgnoreCase(llll1ll11l11)) {
return ll1ll1l111l1 + "." + l1l11ll111ll;
} else if (OOOO00O0OO0O0O00.ModuleStrategy.BeforeLayer.name().equalsIgnoreCase(llll1ll11l11)) {
if (ll1ll1l111l1.contains(OOO0OO00O00O00OO.l11llll1ll11ll1("LnNlcnZpY2U="))) {
return S.substringBeforeLast(ll1ll1l111l1, OOO0OO00O00O00OO.l11llll1ll11ll1("LnNlcnZpY2U=")) + "." + l1l11ll111ll + OOO0OO00O00O00OO.l11llll1ll11ll1("LnNlcnZpY2U=") + S.substringAfterLast(ll1ll1l111l1, OOO0OO00O00O00OO.l11llll1ll11ll1("LnNlcnZpY2U="));
} else {
return S.substringBeforeLast(ll1ll1l111l1, ".") + "." + l1l11ll111ll + "." + S.substringAfterLast(ll1ll1l111l1, ".");
}
} else {
return ll1ll1l111l1;
}
}
}