All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.diboot.devtools.v2.OOOO00OO0OOOOOO0 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.util.D; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.module.SimpleModule; import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.Ordered; import org.springframework.http.MediaType; import org.springframework.http.client.OkHttp3ClientHttpRequestFactory; import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; import org.springframework.web.client.RestTemplate; import java.math.BigInteger; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.List; import java.util.TimeZone; @Configuration @Deprecated() public class OOOO00OO0OOOOOO0 { @Bean("dibootDevtoolsRestTemplate") @Deprecated() public RestTemplate l1ll1l11l1ll11l() { OkHttp3ClientHttpRequestFactory ll11l1ll1l11 = new OkHttp3ClientHttpRequestFactory(); ll11l1ll1l11.setConnectTimeout(120 * 1000); ll11l1ll1l11.setReadTimeout(120 * 1000); RestTemplate l1lll1l1111l = new RestTemplate(ll11l1ll1l11); MappingJackson2HttpMessageConverter lll11l1lll1l = new MappingJackson2HttpMessageConverter(); ObjectMapper l1l11ll1llll = lll11l1lll1l.getObjectMapper(); SimpleModule l1l1ll111l1l = new SimpleModule(); l1l11ll1llll.setSerializationInclusion(JsonInclude.Include.NON_NULL); l1l1ll111l1l.addSerializer(Long.class, ToStringSerializer.instance); l1l1ll111l1l.addSerializer(Long.TYPE, ToStringSerializer.instance); l1l1ll111l1l.addSerializer(BigInteger.class, ToStringSerializer.instance); l1l11ll1llll.registerModule(l1l1ll111l1l); l1l11ll1llll.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); l1l11ll1llll.setDateFormat(new SimpleDateFormat(D.FORMAT_DATETIME_Y4MDHMS)); l1l11ll1llll.setTimeZone(TimeZone.getTimeZone(OOO0OO00O00O00OO.l11llll1ll11ll1("R01UKzg="))); lll11l1lll1l.setObjectMapper(l1l11ll1llll); List l1llll111ll1 = new ArrayList<>(); l1llll111ll1.add(MediaType.APPLICATION_JSON); l1llll111ll1.add(MediaType.TEXT_PLAIN); l1llll111ll1.add(MediaType.TEXT_HTML); lll11l1lll1l.setSupportedMediaTypes(l1llll111ll1); l1l11ll1llll.setDateFormat(new SimpleDateFormat(D.FORMAT_DATETIME_Y4MDHMS)); lll11l1lll1l.setObjectMapper(l1l11ll1llll); List> l1l1llll1ll1 = new ArrayList<>(1); l1l1llll1ll1.add(lll11l1lll1l); l1lll1l1111l.setMessageConverters(l1l1llll1ll1); return l1lll1l1111l; } @Bean @Deprecated() public FilterRegistrationBean l1l1l11l1l11111() { FilterRegistrationBean ll11ll11111l = new FilterRegistrationBean<>(); ll11ll11111l.setFilter(new O00OO00OOOO00OO0()); ll11ll11111l.addUrlPatterns(OOO0OO00O00O00OO.l11llll1ll11ll1("L2RpYm9vdC9kZXZ0b29scy8q")); ll11ll11111l.setOrder(Ordered.HIGHEST_PRECEDENCE); return ll11ll11111l; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy