1 16 17 package org.springframework.scripting.support; 18 19 import org.springframework.aop.target.dynamic.BeanFactoryRefreshableTargetSource; 20 import org.springframework.beans.factory.BeanFactory; 21 import org.springframework.scripting.ScriptSource; 22 import org.springframework.util.Assert; 23 24 32 public class RefreshableScriptTargetSource extends BeanFactoryRefreshableTargetSource { 33 34 private final ScriptSource scriptSource; 35 36 37 44 public RefreshableScriptTargetSource(BeanFactory beanFactory, String beanName, ScriptSource scriptSource) { 45 super(beanFactory, beanName); 46 Assert.notNull(scriptSource, "ScriptSource must not be null"); 47 this.scriptSource = scriptSource; 48 } 49 50 55 protected boolean requiresRefresh() { 56 return this.scriptSource.isModified(); 57 } 58 59 } 60 | Popular Tags |