View Javadoc

1   package edu.calpoly.records.spring;
2   
3   import org.kuali.common.util.execute.Executable;
4   import org.kuali.common.util.execute.PrintMessageExecutable;
5   import org.kuali.common.util.spring.SpringUtils;
6   import org.springframework.beans.factory.annotation.Autowired;
7   import org.springframework.context.annotation.Bean;
8   import org.springframework.context.annotation.Configuration;
9   import org.springframework.core.env.Environment;
10  
11  @Configuration
12  public class PrintMessageConfig {
13  
14  	@Autowired
15  	Environment env;
16  
17  	@Bean
18  	public Executable printMessageExecutable() {
19  		String message = SpringUtils.getProperty(env, "print.message", "NONE");
20  
21  		PrintMessageExecutable pme = new PrintMessageExecutable();
22  		pme.setMessage(message);
23  		return pme;
24  	}
25  
26  }