写java时,调查的数据有时暂时无法使用。 我可以把那个写在临时文件里。
我今天写项目的时候发现了这个好方法。
将上下文内容写入临时文件
@postmapping(/temp ) ) responsebodystringtemp ) requestparamstringcontent ) throwsioexception {文件模板=files }文件return tempFile.getName (; }文件存在于此路径中。 c :usersmyappdatalocaltemp
使用的时候再去取出来
Jon=utils.tempfile content (filename );