2017-05-31 40 views
0
package com.ge.hc.gsit.sbom.configuration; 

import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 
import org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration.WebMvcAutoConfigurationAdapter; 
import org.springframework.context.annotation.ComponentScan; 
import org.springframework.context.annotation.Configuration; 
import org.springframework.web.servlet.config.annotation.EnableWebMvc; 

@Configuration 
@EnableAutoConfiguration 
@EnableWebMvc 
@ComponentScan(basePackages = {"com.abc.xy.gsit.sbom.controller","com.abc.xy.gsit.sbom.exception"}) 
public class MvcConfig extends WebMvcAutoConfigurationAdapter{ 
} 

こんにちは、我々は

WebMvcAutoConfigurationAdapterクラスを使用しますなぜ私はWebMvcAutoConfigurationAdapterクラスが機能しているかを知りたいです。

ドキュメントがあれば教えてください。参考になります。

ありがとうございました。 WebMvcAutoConfigurationAdapter州で

答えて

0

コメントその:

ない

//クラスパス上の

WebMvcAutoConfigurationAdapterクラスが拡張したときにWebMvcConfigurerAdapterが読まれていないことを確認するために、ネストされた設定として定義され

// WebMvcConfigurerAdapterであり、デフォルトの実装であるWebMvcConfigurerのインターフェイスメソッドは、Spring MVC eのJavaベースの設定をカスタマイズするためのコールバックです@EnableWebMvcで公開されています。

したがって、いくつかの動作を変更する場合は、WebMvcConfigurerAdapterを拡張する必要があります。

EnableAutoConfigurationおよび一般的なスプリングブートの詳細:Understanding Spring Boot