001    package edu.calpoly.records.spring;
002    
003    import org.kuali.common.util.execute.Executable;
004    import org.kuali.common.util.execute.PrintMessageExecutable;
005    import org.kuali.common.util.spring.SpringUtils;
006    import org.springframework.beans.factory.annotation.Autowired;
007    import org.springframework.context.annotation.Bean;
008    import org.springframework.context.annotation.Configuration;
009    import org.springframework.core.env.Environment;
010    
011    @Configuration
012    public class PrintMessageConfig {
013    
014            @Autowired
015            Environment env;
016    
017            @Bean
018            public Executable printMessageExecutable() {
019                    String message = SpringUtils.getProperty(env, "print.message", "NONE");
020    
021                    PrintMessageExecutable pme = new PrintMessageExecutable();
022                    pme.setMessage(message);
023                    return pme;
024            }
025    
026    }