public class GroovyMarkupView extends AbstractTemplateView
AbstractTemplateView サブクラス。Spring の Groovy マークアップテンプレートのサポートには、Groovy 2.3.1 以降が必要です。
GroovyMarkupViewResolver, GroovyMarkupConfigurer, Groovy マークアップテンプレートエンジンのドキュメントSPRING_MACRO_REQUEST_CONTEXT_ATTRIBUTEDEFAULT_CONTENT_TYPEloggerPATH_VARIABLES, RESPONSE_STATUS_ATTRIBUTE, SELECTED_CONTENT_TYPE| コンストラクターと説明 |
|---|
GroovyMarkupView() |
| 修飾子と型 | メソッドと説明 |
|---|---|
protected groovy.text.markup.MarkupTemplateEngine | autodetectMarkupTemplateEngine()ApplicationContext を介して MarkupTemplateEngine を自動検出します。 |
boolean | checkResource(LocaleSE locale) 構成された URL が指す基本リソースが実際に存在するかどうかを確認します。 |
protected groovy.text.Template | getTemplate(StringSE viewUrl) 指定されたビュー URL 用に構成された Groovy マークアップテンプレートエンジンによってコンパイルされたテンプレートを返します。 |
protected void | initApplicationContext(ApplicationContext context) 起動時に呼び出されます。 |
protected void | renderMergedTemplateModel(MapSE<StringSE, ObjectSE> model, HttpServletRequestEE request, HttpServletResponseEE response) ビューを実際にレンダリングするには、サブクラスでこのメソッドを実装する必要があります。 |
void | setTemplateEngine(groovy.text.markup.MarkupTemplateEngine engine) このビューで使用する MarkupTemplateEngine を設定します。 |
applyContentType, renderMergedOutputModel, setAllowRequestOverride, setAllowSessionOverride, setExposeRequestAttributes, setExposeSessionAttributes, setExposeSpringMacroHelpersafterPropertiesSet, getUrl, isUrlRequired, setUrl, toStringaddStaticAttribute, 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, writeToResponsegetServletContext, getTempDir, getWebApplicationContext, initServletContext, isContextRequired, setServletContextgetApplicationContext, getMessageSourceAccessor, initApplicationContext, obtainApplicationContext, requiredContextClass, setApplicationContextcloneSE, equalsSE, finalizeSE, getClassSE, hashCodeSE, notifySE, notifyAllSE, waitSE, waitSE, waitSEpublic void setTemplateEngine(groovy.text.markup.MarkupTemplateEngine engine)
設定されていない場合、Web アプリケーションコンテキストで単一の GroovyMarkupConfig Bean を検索し、それを使用して構成済みの MarkupTemplateEngine インスタンスを取得することにより、エンジンが自動検出されます。
GroovyMarkupConfigprotected void initApplicationContext(ApplicationContext context)
templateEngine が手動で設定されていない場合、このメソッドは型で GroovyMarkupConfig Bean を検索し、それを使用して Groovy マークアップテンプレートエンジンを取得します。WebApplicationObjectSupport の initApplicationContext context - 含む ApplicationContextGroovyMarkupConfig, setTemplateEngine(groovy.text.markup.MarkupTemplateEngine)protected groovy.text.markup.MarkupTemplateEngine autodetectMarkupTemplateEngine()
throws BeansExceptionpublic boolean checkResource(LocaleSE locale) throws ExceptionSE
AbstractUrlBasedViewAbstractUrlBasedView の checkResource locale - 探している希望のロケール true。false が存在しないことがわかっている場合 ExceptionSE - リソースは存在するが無効である場合 (たとえば解析できませんでした)protected void renderMergedTemplateModel(MapSE<StringSE,ObjectSE> model, HttpServletRequestEE request, HttpServletResponseEE response) throws ExceptionSE
AbstractTemplateViewAbstractTemplateView の renderMergedTemplateModel model - 必要に応じてリクエスト属性とセッション属性がマージされた出力マップの組み合わせ request - 現在の HTTP リクエスト response - 現在の HTTP レスポンス ExceptionSE - レンダリングに失敗した場合 protected groovy.text.Template getTemplate(StringSE viewUrl) throws ExceptionSE
ExceptionSE