Skip to content

Instantly share code, notes, and snippets.

View huotaihe's full-sized avatar
🎯
Focusing

和太贺(寒溪) huotaihe

🎯
Focusing
View GitHub Profile
@thomasdarimont
thomasdarimont / App.java
Created September 22, 2015 22:01
Example for refreshable Groovy Scripts via Java Config. RefreshableGroovyScript is a FactoryBean that produces Proxies backed by a RefreshableTargetSource. Changes in the groovy script are picked up after the configured time interval.
package demo;
import static java.util.concurrent.TimeUnit.*;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
@SpringBootApplication
public class App {
@thomasdarimont
thomasdarimont / App.java
Last active May 13, 2022 12:40
Example for defining a refreshable Groovy Script in Spring Boot with Java Config - at least thats the current state of affairs :)
package demo;
import java.util.concurrent.TimeUnit;
import org.springframework.aop.TargetSource;
import org.springframework.aop.framework.ProxyFactory;
import org.springframework.aop.support.DelegatingIntroductionInterceptor;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;