springboot 2.xの設定

図1に示すように、コンフィギュレーションファイルに設定されています

#############指定されたすべての日付は、項目タイプは、JSON形式を返さ########### 
spring.jackson.date -format = YYYY-MM-はHH×:ミリメートル:SSは
spring.jackson.serialization.write -dates-AS- =タイムスタンプをfalseに
############ ################セットがnull値を返しません。 ################ 
#1 spring.jackson。デフォルト -property-への組み入れ= non_null

##############設定ファイルのアップロードサイズ############ 
spring.servlet.multipart.max-ファイルサイズ= 1073741824
spring.servlet.multipart.max -requestサイズ= 10737418240

WebMvcConfigurerを達成するために2、登録されたインターセプタ

@Configuration
 パブリック クラス WebAppConfigは実装WebMvcConfigurer { 
    @Autowired 
    プライベートHeaderInterceptor headerInterceptorを。

    @Override 
    公共 のボイドaddInterceptors(InterceptorRegistryレジストリ){ 
        registry.addInterceptor(headerInterceptor).addPathPatterns( "/ **" ); 
    } 


}

 

おすすめ

転載: www.cnblogs.com/cq-yangzhou/p/10929609.html