45
45
import org .springframework .web .servlet .support .BindStatus ;
46
46
import org .springframework .web .servlet .support .RequestContext ;
47
47
import org .springframework .web .servlet .theme .FixedThemeResolver ;
48
+ import org .springframework .web .servlet .view .AbstractTemplateView ;
48
49
import org .springframework .web .servlet .view .DummyMacroRequestContext ;
49
50
50
51
import static org .assertj .core .api .Assertions .assertThat ;
51
52
52
53
/**
53
54
* @author Darren Davison
54
55
* @author Juergen Hoeller
56
+ * @author Sam Brannen
55
57
* @since 25.01.2005
56
58
*/
57
59
public class FreeMarkerMacroTests {
@@ -107,7 +109,6 @@ protected void processTemplate(Template template, SimpleHash fmModel, HttpServle
107
109
};
108
110
fv .setUrl (TEMPLATE_FILE );
109
111
fv .setApplicationContext (wac );
110
- fv .setExposeSpringMacroHelpers (true );
111
112
112
113
Map <String , Object > model = new HashMap <>();
113
114
model .put ("tb" , new TestBean ("juergen" , 99 ));
@@ -126,7 +127,6 @@ protected void processTemplate(Template template, SimpleHash model, HttpServletR
126
127
};
127
128
fv .setUrl (TEMPLATE_FILE );
128
129
fv .setApplicationContext (wac );
129
- fv .setExposeSpringMacroHelpers (true );
130
130
131
131
Map <String , Object > model = new HashMap <>();
132
132
model .put (FreeMarkerView .SPRING_MACRO_REQUEST_CONTEXT_ATTRIBUTE , helperTool );
@@ -313,7 +313,7 @@ private String getMacroOutput(String name) throws Exception {
313
313
Configuration config = fc .getConfiguration ();
314
314
Map <String , Object > model = new HashMap <>();
315
315
model .put ("command" , darren );
316
- model .put ("springMacroRequestContext" , rc );
316
+ model .put (AbstractTemplateView . SPRING_MACRO_REQUEST_CONTEXT_ATTRIBUTE , rc );
317
317
model .put ("msgArgs" , new Object [] { "World" });
318
318
model .put ("nameOptionMap" , names );
319
319
model .put ("options" , names .values ());
0 commit comments