OWL ITS + 탐지시스템(인터넷 진흥원)
이민희
2022-01-14 6751a9e750f89178e4f48f932862ec992a08bb83
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;
    }
}