摘要:mvn install:install-file -Dfile=D:\link\lib\todo-1.0.jar -DgroupId=com.eelve -DartifactId=todo -Dversion=1.0 -Dpackaging=jar <dependency> <groupId>com
阅读全文
摘要:1、引信fastjson来解析读取的数据 File jsonFile = ResourceUtils.getFile(“classpath:abc.json”); String json = FileUtils.readFileToString(jsonFile); JSONArray jsonAr
阅读全文
摘要:1、pom.xml依赖 <dependency> <groupId>org.apache.httpcomponents</groupId> <artifactId>httpcore</artifactId> <version>4.4</version> </dependency> <dependen
阅读全文
摘要:public static Map<String,String> getProxyConfig(){ Map map = null; Yaml yaml = new Yaml(); Resource resource = new DefaultResourceLoader().getResource
阅读全文
摘要:/**读取单个文件每行数据*/ public static void readFileLine(String strFile){ try { File file = new File(strFile); BufferedReader bufferedReader = new BufferedRead
阅读全文
摘要:1、springboot引入依赖 <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-validator</artifactId> <version>5.4.1.Final</version> </dependenc
阅读全文
摘要:Time的运行 import java.text.SimpleDateFormat; import java.util.Date; /** * Created by EalenXie on 2018/5/28 16:34 */ public enum TimeUtils { getTimeUtil;
阅读全文
摘要:@Component public class MyBeanFactory<T> { public static <T> T getBean(Class<T> checkType){ try { Class<T> clz = (Class<T>)Class.forName(checkType.get
阅读全文
摘要:public String hello() { StringBuilder result = new StringBuilder(); // GET //方式一 result.append(restTemplate.getForEntity("http://HELLO-SERVICE/hello",
阅读全文
摘要:1、fastJson转javabean Student student = JSON.parseObject(JSON_OBJ_STR, new TypeReference<Student>() {}); 2、fastJson转list gameListStr = "[{"gameId":"1","
阅读全文