otale / tale

🦄 Best beautiful java blog, worth a try
https://tale.biezhi.me
MIT License
4.87k stars 1.5k forks source link

Throw c.b.m.h.DefaultExceptionHandler when adding a new article #552

Open JasonLiuLiuLiuLiu opened 5 years ago

JasonLiuLiuLiuLiu commented 5 years ago

hi biezhi,

An exception is thrown when adding the contents of the following matkdown file to the blog system. I think this may be a problem. Can you take a look when you have time?

Thanks

Content: https://github.com/liuzhenyulive/MiniConfiguration/blob/master/Doc/ReloadOnChange.md/ Log:

2019/05/04 11:20:45 ERROR [   worker@thread-2 ] c.b.m.h.DefaultExceptionHandler :  io.netty.handler.codec.http.multipart.HttpPostRequestDecoder$ErrorDataDecoderException: java.io.IOException: Unable to create temporary file, /tmp/Attr_4437871712331634491_{"cid":"","title":"浅析 .Net Core中配置文件的ReloadOnChange","slug":"","tags":"","content":"# 浅析 .Net Core中配置文件的ReloadOnChange\n\n## Pre\n\n很早在看 Jesse 的[Asp.net Core快速入门](http:/video.jessetalk.cn/course/4)的课程的时候就了解到了在Asp .net core中,如果添加的Json配置被更改了,是支持自动重载配置的,作为一名有着严重\"造轮子\"情节的程序员,最近在折腾一个博客系统,也想造出一个这样能自动更新以Mysql为数据源的ConfigureSource,于是开了AddJsonFile这个拓展函数的源码,发现别有洞天,蛮有意思,本篇文章就简单地聊一聊Json config的ReloadOnChange是如何实现的,在学习ReloadOnChange的过程中,我们会把Configuration也顺带撩一把😁,希望对小伙伴们有所帮助.\n\n``` c#\n public static IWebHostBuilder CreateWebHostBuilder(string[] args).att
    at io.netty.handler.codec.http.multipart.HttpPostStandardRequestDecoder.parseBodyAttributes(HttpPostStandardRequestDecoder.java:605)
    at io.netty.handler.codec.http.multipart.HttpPostStandardRequestDecoder.parseBody(HttpPostStandardRequestDecoder.java:360)
    at io.netty.handler.codec.http.multipart.HttpPostStandardRequestDecoder.offer(HttpPostStandardRequestDecoder.java:289)
    at io.netty.handler.codec.http.multipart.HttpPostStandardRequestDecoder.offer(HttpPostStandardRequestDecoder.java:46)
    at io.netty.handler.codec.http.multipart.HttpPostRequestDecoder.offer(HttpPostRequestDecoder.java:227)
    at com.blade.mvc.http.HttpRequest.init(HttpRequest.java:359)
    at com.blade.server.netty.HttpServerHandler.buildWebContext(HttpServerHandler.java:95)
    at com.blade.server.netty.HttpServerHandler.lambda$channelRead0$0(HttpServerHandler.java:84)
    at java.util.concurrent.CompletableFuture.uniApply(CompletableFuture.java:602)
    at java.util.concurrent.CompletableFuture$UniApply.tryFire(CompletableFuture.java:577)
    at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442)
    at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
    at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
    at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:462)
    at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.io.IOException: Unable to create temporary file, /tmp/Attr_4437871712331634491_{"cid":"","title":"浅析 .Net Core中配置文件的ReloadOnChange","slug":"","tags":"","content":"# 浅析 .Net Core中配置文件的ReloadOnChange\n\n## Pre\n\n很早在看 Jesse 的[Asp.net Core快速入门](http:/video.jessetalk.cn/course/4)的课程的时候就了解到了在Asp .net core中,如果添加的Json配置被更改了,是支持自动重载配置的,作为一名有着严重\"造轮子\"情节的程序员,最近在折腾一个博客系统,也想造出一个这样能自动更新以Mysql为数据源的ConfigureSource,于是开了AddJsonFile这个拓展函数的源码,发现别有洞天,蛮有意思,本篇文章就简单地聊一聊Json config的ReloadOnChange是如何实现的,在学习ReloadOnChange的过程中,我们会把Configuration也顺带撩一把😁,希望对小伙伴们有所帮助.\n\n``` c#\n public static IWebHostBuilder CreateWebHostBuilder(string[] args).att
    at java.io.File$TempDirectory.generateFile(File.java:1921)
    at java.io.File.createTempFile(File.java:2010)
    at java.io.File.createTempFile(File.java:2070)
    at io.netty.handler.codec.http.multipart.AbstractDiskHttpData.tempFile(AbstractDiskHttpData.java:90)
    at io.netty.handler.codec.http.multipart.AbstractDiskHttpData.addContent(AbstractDiskHttpData.java:163)
    at io.netty.handler.codec.http.multipart.DiskAttribute.addContent(DiskAttribute.java:99)
    at io.netty.handler.codec.http.multipart.HttpPostStandardRequestDecoder.setFinalBuffer(HttpPostStandardRequestDecoder.java:614)
    at io.netty.handler.codec.http.multipart.HttpPostStandardRequestDecoder.parseBodyAttributes(HttpPostStandardRequestDecoder.java:539)
    ... 15 more