Commit 3036f297 authored by 张征龙's avatar 张征龙

精简jar

parent 33d545b1
......@@ -71,20 +71,11 @@ dependencyManagement {
}
dependencies {
compile 'cn.com.duiba.boot:spring-boot-starter-perftest'
compile 'cn.com.duiba.boot:spring-boot-starter-cat'
compile 'cn.com.duiba.boot:spring-boot-starter-xss'
compile 'org.springframework.boot:spring-boot-starter-web'
compile 'org.springframework.boot:spring-boot-starter-actuator'
compile 'org.springframework.boot:spring-boot-starter-freemarker'
compile 'org.springframework.cloud:spring-cloud-starter-config'
compile 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
compile 'org.springframework.cloud:spring-cloud-starter-netflix-hystrix'
compile 'org.springframework.cloud:spring-cloud-starter-netflix-ribbon'
compile 'org.springframework.cloud:spring-cloud-starter-openfeign'
compile 'javax.validation:validation-api:1.1.0.Final'
compile 'io.springfox:springfox-swagger-ui:2.5.0'
compile 'io.springfox:springfox-swagger2:2.5.0'
......
......@@ -2,14 +2,8 @@ package cn.com.duiba.miria.project.test;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableDuibaFeignClients;
@SpringBootApplication
@EnableDiscoveryClient
@EnableCircuitBreaker
@EnableDuibaFeignClients(basePackages = { "cn.com.duiba" })
public class Application {
public static void main(String[] args) {
......
......@@ -6,11 +6,8 @@ import org.slf4j.Logger;
import sun.applet.Main;
import javax.servlet.ServletOutputStream;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.*;
import java.net.URLDecoder;
import java.net.URLEncoder;
import java.nio.charset.Charset;
import java.util.ArrayList;
......@@ -109,12 +106,46 @@ public class CSVCreate {
List<String> s=new ArrayList<String>();
s.add("测试");
s.add("差别");
for(int i=0;i<10;i++){
charSink.writeLines(s);
}
charSink.writeLines(s);
System.out.println("end");
} catch (Exception e) {
e.printStackTrace();
}
}
public static String getEncoding(String str) {
String encode = "GB2312";
try {
if (str.equals(new String(str.getBytes(encode), encode))) { // 判断是不是GB2312
String s = encode;
return s; // 是的话,返回“GB2312“,以下代码同理
}
} catch (Exception exception) {
}
encode = "ISO-8859-1";
try {
if (str.equals(new String(str.getBytes(encode), encode))) { // 判断是不是ISO-8859-1
String s1 = encode;
return s1;
}
} catch (Exception exception1) {
}
encode = "UTF-8";
try {
if (str.equals(new String(str.getBytes(encode), encode))) { // 判断是不是UTF-8
String s2 = encode;
return s2;
}
} catch (Exception exception2) {
}
encode = "GBK";
try {
if (str.equals(new String(str.getBytes(encode), encode))) { // 判断是不是GBK
String s3 = encode;
return s3;
}
} catch (Exception exception3) {
}
return "no charSet matched"; // 如果都不是,说明输入的内容不属于常见的编码格式。
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment