クラス MustacheView
java.lang.ObjectSE
org.springframework.context.support.ApplicationObjectSupport
org.springframework.web.context.support.WebApplicationObjectSupport
org.springframework.web.servlet.view.AbstractView
org.springframework.web.servlet.view.AbstractUrlBasedView
org.springframework.web.servlet.view.AbstractTemplateView
org.springframework.boot.mustache.servlet.view.MustacheView
- 実装済みのインターフェース一覧:
Aware, BeanNameAware, InitializingBean, ApplicationContextAware, ServletContextAware, View
Mustache テンプレートエンジンを使用した Spring MVC
View。- 導入:
- 4.0.0
- 作成者:
- Brian Clozel, Dave Syer, Phillip Webb
フィールド概要
クラス AbstractTemplateView から継承されたフィールド
SPRING_MACRO_REQUEST_CONTEXT_ATTRIBUTEクラス AbstractView から継承されたフィールド
DEFAULT_CONTENT_TYPEクラス ApplicationObjectSupport から継承されたフィールド
loggerインターフェース View から継承されたフィールド
PATH_VARIABLES, RESPONSE_STATUS_ATTRIBUTE, SELECTED_CONTENT_TYPEコンストラクター概要
コンストラクター方法の概要
修飾子と型メソッド説明booleancheckResource(LocaleSE locale) protected voidrenderMergedTemplateModel(MapSE<StringSE, ObjectSE> model, HttpServletRequestEE request, HttpServletResponseEE response) voidsetCharset(@Nullable StringSE charset) 非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。voidsetCharset(@Nullable CharsetSE charset) Mustache テンプレートファイルの読み取りに使用するCharsetSE を設定します。voidsetCompiler(com.samskivert.mustache.Mustache.Compiler compiler) このビューで使用する Mustache コンパイラーを設定します。クラス AbstractTemplateView から継承されたメソッド
applyContentType, renderMergedOutputModel, setAllowRequestOverride, setAllowSessionOverride, setExposeRequestAttributes, setExposeSessionAttributes, setExposeSpringMacroHelpersクラス AbstractUrlBasedView から継承されたメソッド
afterPropertiesSet, getUrl, isUrlRequired, setUrl, toStringクラス AbstractView から継承されたメソッド
addStaticAttribute, createMergedOutputModel, createRequestContext, createTemporaryOutputStream, exposeModelAsRequestAttributes, formatViewName, generatesDownloadContent, getAttributesMap, getBeanName, getContentType, getRequestContextAttribute, getRequestToExpose, getStaticAttributes, isExposePathVariables, prepareResponse, render, setAttributes, setAttributesCSV, setAttributesMap, setBeanName, setContentType, setExposeContextBeansAsAttributes, setExposedContextBeanNames, setExposePathVariables, setRequestContextAttribute, setResponseContentType, writeToResponseクラス WebApplicationObjectSupport から継承されたメソッド
getServletContext, getTempDir, getWebApplicationContext, initApplicationContext, initServletContext, isContextRequired, setServletContext
コンストラクターの詳細
MustacheView
public MustacheView()
メソッドの詳細
setCompiler
public void setCompiler(com.samskivert.mustache.Mustache.Compiler compiler) このビューで使用する Mustache コンパイラーを設定します。通常、このプロパティは直接設定されません。代わりに、Mustache テンプレートのコンパイルに使用される Spring アプリケーションコンテキストで単一の
Mustache.Compilerが期待されます。- パラメーター:
compiler- Mustache コンパイラー
setCharset
setCharset
非推奨、削除予定: この API 要素は、将来のバージョンで削除される可能性があります。4.1.0 以降、4.3.0 で削除されsetCharset(Charset)を推奨Mustache テンプレートファイルの読み取りに使用する文字セットの名前を設定します。- パラメーター:
charset- 文字セット
checkResource
- オーバーライド:
- クラス
AbstractUrlBasedViewのcheckResource - 例外:
ExceptionSE
renderMergedTemplateModel
protected void renderMergedTemplateModel(MapSE<StringSE, ObjectSE> model, HttpServletRequestEE request, HttpServletResponseEE response) throws ExceptionSE- 次で指定:
- クラス
AbstractTemplateViewのrenderMergedTemplateModel - 例外:
ExceptionSE
setCharset(Charset)を推奨