posted @ 2023-03-31 11:09 瘋狂搬磚人 閱讀(44) 評論(0) 推薦(0)
摘要:
方法一:冒泡排序 public class exam04 { public static void main(String[] args) { List<ProductOffering> productOfferings = new ArrayList<>(); productOfferings.a 閱讀全文
摘要:
@RestController = @Controller + @ResponseBody 閱讀全文
posted @ 2023-01-31 19:34 瘋狂搬磚人 閱讀(72) 評論(0) 推薦(0)
摘要:
$.query.get("id") jquery.params.js代碼 /** * jQuery.query - Query String Modification and Creation for jQuery * Written by Blair Mitchelmore (blair DOT 閱讀全文
posted @ 2022-12-19 11:38 瘋狂搬磚人 閱讀(154) 評論(0) 推薦(0)
摘要:
path= "d:\\Project\\log\\log.txt"; File file = new File(path); //創建文件目錄 if(!file.getParentFile().exists()){ file.getParentFile().mkdirs();//多級 } file. 閱讀全文
posted @ 2022-11-21 19:53 瘋狂搬磚人 閱讀(26) 評論(0) 推薦(0)
摘要:
未處理前: "gender":"GenderEnum.FEMALE(code=2, gender=女)" 解決方法:使用jackson提供的注解 @JsonFormat,將其寫在要轉換的枚舉類上 @JsonFormat(shape = JsonFormat.Shape.OBJECT) @AllArg 閱讀全文
posted @ 2022-11-18 17:05 瘋狂搬磚人 閱讀(654) 評論(0) 推薦(0)
摘要:
<script type="text/javascript"> var strDate = ''; $(function(){ // 獲取時間戳 時間戳為10位需*1000,時間戳為13位的話則不用 var nowDate = new Date().getTime(); //156462452688 閱讀全文
posted @ 2022-11-07 13:03 瘋狂搬磚人 閱讀(1328) 評論(0) 推薦(0)
摘要:
在web.xml文件中配置SpringMvc編碼過濾器的編碼方式,設置初始編碼方式 <!-- SpringMVC 提供的過濾器 注意 url-pattern 為 /*,過濾所有請求(包括 jsp );如果設置為 /,訪問 jsp 就不會經過過濾器了! --> <filter> <filter-nam 閱讀全文
posted @ 2022-10-31 09:43 瘋狂搬磚人 閱讀(20) 評論(0) 推薦(0)
摘要:
1. String類型的時間轉為DateTime public static Date transferString2Date(String s) { Date date = new Date(); try { date = new SimpleDateFormat("yyyy-MM-dd HH:m 閱讀全文
posted @ 2022-10-29 14:39 瘋狂搬磚人 閱讀(1406) 評論(0) 推薦(0)
摘要:
<build> <!--設置資源過濾--> <resources> <resource> <directory>src/main/java</directory> <includes> <include>**/*.properties</include> <include>**/*.xml</inc 閱讀全文
posted @ 2022-10-24 15:01 瘋狂搬磚人 閱讀(242) 評論(0) 推薦(0)
摘要:
問題描述(中國人加油,真痛苦) 無法正確輸出中文字符:(請正確分辨自己是哪一種亂碼問題!) 解決方法 1、最容易想到 File -> Settings -> File Encodings下設置編碼格式為UTF-8,此種最常見,一般剛裝idea或者剛導入項目的時候會遇到此處編碼格式未修改的情況。 2、 閱讀全文
posted @ 2022-10-07 18:18 瘋狂搬磚人 閱讀(842) 評論(0) 推薦(0)
浙公網安備 33010602011771號