OWL ITS + 탐지시스템(인터넷 진흥원)
이민희
2022-03-17 916a3cbabe4e50062fce61ff6f2f5d46c05dfbd1
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;
    }
}