【转】跨平台JS GUI桌面开发列表 2019年9月21日 | Leave a comment https://www.jianshu.com/p/8338953f9cc6 https://g… Read More
【未解决】spring security 有时不会注入 Principal ? 2019年9月19日 | Leave a comment 问题: 已经的 filter 中写入了 SecurityContextHolder.getContext().setAuthentication(auth); 1 SecurityContextHolder.getContext().setAuthentication(auth); 但是… Read More
【未解决】Spring JPA 竟然自动保存 2019年9月16日 | Leave a comment 问题: Java @Service public class T1Service { @Autowired T1Repo t1Repo; @Transactional public void test(int id) { T1 t1 = t1Repo.getOne(id); t1.setName("tt" + new Date()); } } 1234567891011 @Servicepublic class T1Service { @Autowired T1Repo t1Repo; @Transactional public void test(int id) { T1 t1 = t1Repo.getOne(id); t1.setName("tt" + new Date()); }} 虽然没有 t1Repo… Read More
spring data jpa @Onetoone 出现了 1+n query 2019年9月9日 | Leave a comment 问题 Issue. article 是 @OneToOne 但是 取 issue.article 时还会去se… Read More
【转】Navicat实用功能:数据备份与结构同步 2019年9月6日 | Leave a comment https://juejin.im/post/5d00fc865188255fc6384126 … Read More
腾讯云 k8s java 程序参数配置 2019年8月28日 | Leave a comment 解决: 在腾讯云 pod 界面 按行分开 如 -Xmx1024m -Xms512m -Duser.timezone=GMT+8 -Djava.security.egd=file:/dev/./urandom -jar /app/my.jar --server.port=80 1234567 -Xmx1024m-Xms512m-Duser.timezone=GMT+8-Djava.security.egd=file:/dev/./urandom-jar/app/my.jar--server.port=80 … Read More
加入 taobao sdk 后 maven compile 卡住 2019年8月21日 | Leave a comment 一直编译中 解决: 调试发现一直在扫描 taobao jar 包里边的东西 解压 taobao… Read More
【转】How to Build Good Software 2019年8月20日 | Leave a comment https://www.csc.gov.sg/articles/how-to-build-good-softw… Read More
apache client https 禁止证书检测 2019年8月13日 | Leave a comment 解决: /** * 绕过验证 * * @return * @throws NoSuchAlgorithmException * @throws KeyManagementException */ static SSLContext createIgnoreVerifySSL() throws NoSuchAlgorithmException, KeyManagementException { SSLContext sc = SSLContext.getInstance("SSLv3"); // 实现一个X509TrustManager接口,用于绕过验证,不用修改里面的方法 X509TrustManager trustManager = new X509TrustManager() { @Override public void checkClientTrusted( java.security.cert.X509Certificate[] paramArrayOfX509Certificate, String paramString) throws CertificateException { } @Override public void checkServerTrusted( java.security.cert.X509Certificate[] paramArrayOfX509Certificate, String paramString) throws CertificateException { } @Override public java.security.cert.X509Certificate[] getAcceptedIssuers() { return null; } }; sc.init(null, new TrustManager[]{trustManager}, null); return sc; } public static CloseableHttpClient ignoreSSLClient() throws KeyManagementException, NoSuchAlgorithmException { //采用绕过验证的方式处理https请求 SSLContext sslcontext = HttpUtils.createIgnoreVerifySSL(); //设置协议http和https对应的处理socket链接工厂的对象 Registry<ConnectionSocketFactory> socketFactoryRegistry = RegistryBuilder.<ConnectionSocketFactory>create() .register("http", PlainConnectionSocketFactory.INSTANCE) .register("https", new SSLConnectionSocketFactory(sslcontext)) .build(); PoolingHttpClientConnectionManager connManager = new PoolingHttpClientConnectionManager(socketFactoryRegistry); HttpClients.custom().setConnectionManager(connManager); //创建自定义的httpclient对象 CloseableHttpClient client = HttpClients.custom().setConnectionManager(connManager).build(); return client; } 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 /** * 绕过验证 * * @return * @throws NoSuchAlgorithmException * @throws KeyManagementException */ static SSLContext createIgnoreVerifySSL() throws NoSuchAlgorithmException, KeyManagementException { SSLContext sc = SSLContext.getInstance("SSLv3"); // 实现一个X509TrustManager接口,用于绕过验证,不用修改里面的方法 X509TrustManager trustManager = new X509TrustManager() { @Override public void checkClientTrusted( java.security.cert.X509Certificate[] paramArrayOfX509Certificate, String paramString) throws CertificateException { } @Override public void checkServerTrusted( java.security.cert.X509Certificate[] paramArrayOfX509Certificate, String paramString) throws CertificateException { } @Override public java.security.cert.X509Certificate[] getAcceptedIssuers() { return null; } }; sc.init(null, new TrustManager[]{trustManager}, null); return sc; } public static CloseableHttpClient ignoreSSLClient() throws KeyManagementException, NoSuchAlgorithmException {//采用绕过验证的方式处理https请求 SSLContext sslcontext = HttpUtils.createIgnoreVerifySSL(); //设置协议http和https对应的处理socket链接工厂的对象 Registry<ConnectionSocketFactory> socketFactoryRegistry = RegistryBuilder.<ConnectionSocketFactory>create() .register("http", PlainConnectionSocketFactory.INSTANCE) .register("https", new SSLConnectionSocketFactory(sslcontext)) .build(); PoolingHttpClientConnectionManager connManager = new PoolingHttpClientConnectionManager(socketFactoryRegistry); HttpClients.custom().setConnectionManager(connManager); //创建自定义的httpclient对象 CloseableHttpClient client = HttpClients.custom().setConnectionManager(connManager).build(); return client; } &nbs… Read More
缓存注意!!serialVersionUID 2019年7月25日 | Leave a comment https://docs.oracle.com/javase/6/docs/platform/serializ… Read More