提交 | 用户 | 时间
|
a6de49
|
1 |
package com.iailab.module.data.common.utils; |
H |
2 |
|
|
3 |
import org.springframework.context.annotation.Bean; |
|
4 |
import org.springframework.context.annotation.Configuration; |
|
5 |
|
|
6 |
import javax.script.ScriptEngine; |
|
7 |
import javax.script.ScriptEngineManager; |
|
8 |
|
|
9 |
/** |
|
10 |
* @author PanZhibao |
|
11 |
* @date 2021年06月09日 16:38 |
|
12 |
*/ |
|
13 |
@Configuration |
|
14 |
public class ScriptEngineConfiguration { |
|
15 |
|
|
16 |
@Bean("scriptEngine") |
|
17 |
public ScriptEngine scriptEngine() { |
|
18 |
return new ScriptEngineManager().getEngineByName("javascript"); |
|
19 |
} |
|
20 |
} |