1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
| package kr.wisestone.owl.util;
|
| import org.thymeleaf.context.Context;
|
| import java.util.Locale;
| import java.util.Map;
|
| public class StringTemplateUtil {
|
| public static Context makeContext(Map<String, Object> contents, Locale locale) {
| Context context = new Context(locale);
|
| for(String key : contents.keySet()) {
| context.setVariable(key, contents.get(key));
| }
| return context;
| }
| }
|
|