随笔分类 -  java后端笔记

摘要:安装文件目录:idea64.exe.vmoptions -Xms256m -Xmx1024m -XX:ReservedCodeCacheSize=240m -XX:+UseConcMarkSweepGC -XX:SoftRefLRUPolicyMSPerMB=50 项目启动配置:vim option 阅读全文
posted @ 2022-12-15 20:08 _Lawrence 阅读(116) 评论(0) 推荐(0)
摘要:1、String.format("%.2f",(float) 2/3) 2、DecimalFormat decimalFormat = new DecimalFormat("#.00"); decimalFormat.format((double) 10/3); 阅读全文
posted @ 2022-09-29 18:56 _Lawrence 阅读(67) 评论(0) 推荐(0)
摘要:public static boolean isBetween(LocalDateTime beginTime, LocalDateTime endTime) { LocalDateTime now = LocalDateTime.now(); boolean flag = false; if (n 阅读全文
posted @ 2022-09-07 15:16 _Lawrence 阅读(646) 评论(0) 推荐(0)
摘要:org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframe work.boot.web.server.WebServe 阅读全文
posted @ 2022-08-04 10:02 _Lawrence 阅读(190) 评论(0) 推荐(0)
摘要:public static void http(String url,JSONObject object){ try{ CloseableHttpClient httpClient = HttpClientBuilder.create().build(); HttpPost httpPost = n 阅读全文
posted @ 2022-07-12 09:23 _Lawrence 阅读(316) 评论(0) 推荐(0)
摘要:String str = "'0ec93d13eaae488db7f9f644cb4885c3','fsfds','sdfsdfsd'"; List<String> list = Arrays.asList(str.split(",")); list.forEach(s -> { System.ou 阅读全文
posted @ 2022-07-12 09:21 _Lawrence 阅读(467) 评论(0) 推荐(0)
摘要:@GetMapping("app") public void app(HttpServletResponse response) throws IOException { ServletOutputStream out = null; ClassPathResource classPathResou 阅读全文
posted @ 2022-06-29 15:49 _Lawrence 阅读(918) 评论(0) 推荐(0)
摘要:public static String getWeek(String date) throws ParseException { String[] weeks = {"1","2","3","4","5","6","7"}; Calendar cal = Calendar.getInstance( 阅读全文
posted @ 2022-05-28 10:47 _Lawrence 阅读(173) 评论(0) 推荐(0)
摘要:public static List<Date> getDayListOfMonth() throws ParseException { List list = new ArrayList(); Calendar aCalendar = Calendar.getInstance(Locale.CHI 阅读全文
posted @ 2022-05-28 10:04 _Lawrence 阅读(433) 评论(0) 推荐(0)
摘要:public static List<String> allRangeDate(String startDateStr, String endDateStr) { List<String> listDate = new ArrayList<>(); DateTimeFormatter df1 = D 阅读全文
posted @ 2022-05-06 11:21 _Lawrence 阅读(689) 评论(0) 推荐(0)
摘要:Java时间格式转换大全 import java.text.*; import java.util.Calendar; public class VeDate { /** * 获取现在时间 * * @return 返回时间类型 yyyy-MM-dd HH:mm:ss */ public static 阅读全文
posted @ 2022-03-26 17:29 _Lawrence 阅读(80) 评论(0) 推荐(0)
摘要:<dependency> <groupId>com.dp</groupId> <artifactId>dp-common</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency> 阅读全文
posted @ 2022-03-21 19:39 _Lawrence 阅读(298) 评论(0) 推荐(0)
摘要:public static String getIp() throws SocketException { Enumeration allNetInterfaces = NetworkInterface.getNetworkInterfaces(); InetAddress ip = null; S 阅读全文
posted @ 2021-11-25 11:04 _Lawrence 阅读(209) 评论(0) 推荐(0)
摘要:ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes(); HttpServletRequest request = attributes. 阅读全文
posted @ 2021-11-25 11:02 _Lawrence 阅读(808) 评论(0) 推荐(0)
摘要:@Override public List<Map<String, Object>> findDicById(Map<String, Object> map) { List<Map<String, Object>> tree = new ArrayList<>(); map.put("pid","0 阅读全文
posted @ 2021-06-25 10:42 _Lawrence 阅读(271) 评论(0) 推荐(0)
摘要:public static void main(String[] args) throws APIConnectionException, APIRequestException { pushNotice("","baojing","网页内容","网页标题"); } private static f 阅读全文
posted @ 2020-12-29 15:42 _Lawrence 阅读(341) 评论(0) 推荐(0)
摘要:一、spring项目构建 使用idea创建项目 二、Sping IOC容器 1、简单实例 package entity; /** * @Author LLF * @Date Created in 2020/12/7 10:04 * @Description * @Version 1.0 **/ pu 阅读全文
posted @ 2020-12-07 17:41 _Lawrence 阅读(181) 评论(0) 推荐(0)
摘要:查找命令:netstat -aon|findstr 端口号停止进程命令:taskkill /pid PID号 /f 阅读全文
posted @ 2020-11-10 09:17 _Lawrence 阅读(151) 评论(0) 推荐(0)
摘要:将XML文件中的<mirrors>节点修改为(阿里云的仓库): <mirrors> <!-- 阿里云仓库 --> <mirror> <id>alimaven</id> <mirrorOf>central</mirrorOf> <name>aliyun maven</name> <url>http:/ 阅读全文
posted @ 2020-11-03 08:50 _Lawrence 阅读(1614) 评论(0) 推荐(0)
摘要:请求: RestTemplate restTemplate = new RestTemplate(); LinkedMultiValueMap body=new LinkedMultiValueMap(); body.add("map",dataService.runData()); HttpHea 阅读全文
posted @ 2020-10-19 12:34 _Lawrence 阅读(870) 评论(0) 推荐(0)