package com.artfess.base.conf;

import com.artfess.base.groovy.GroovyScriptEngine;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;
import java.util.List;



@Configuration
public class ScriptEngineConfig {
	@Bean
	public GroovyScriptEngine getGroovyScriptEngine(){
		GroovyScriptEngine engine = new GroovyScriptEngine();
		List<String> bindingInterface = new ArrayList<String>();
		bindingInterface.add("com.artfess.base.groovy.IScript");
		bindingInterface.add("com.artfess.base.groovy.IUserScript");
		engine.setBindingInterface(bindingInterface);
		return engine;
	}
}
