- 博客(4)
- 收藏
- 关注
原创 jdk1.8中接口可以写默认方法
interface Vehicle { default void print(){ System.out.println("我是一辆车!"); } static void blowHorn(){ System.out.println("按喇叭!!!"); }}必须是default (默认)或者static (静态)修饰的方法,这样,接口中也可以写实现,而且接口的实现类可以重新接...
2018-05-23 09:57:18 2508
原创 io流中的txt文件编码更改
public static void main(String[] args){File file = new File(filePath);String str = readTxt(file);FileOutputStream writerStream = new FileOutputStream(file); BufferedWriter writer = new BufferedWriter(...
2018-05-23 09:56:25 296
原创 spring boot静态资源映射
spring boot 静态资源映射package com.ehongcn.ccp.ss.dd.common.security;import org.springframework.beans.factory.annotation.Value;import org.springframework.context.annotation.Configuration;import org.springf...
2018-05-23 09:55:21 240
转载 文件下载
/*** 文件下载* * * @return 保存路径* @throws FileNotFoundException */@RequestMapping("/videoDownload")@ResponseBodypublic String saveUrlAs(HttpServletRequest request, String videoUrl) throws FileNotFoundExcep...
2018-05-23 09:53:10 99
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人