|
@ -1,41 +0,0 @@
|
|
|
package com.yihu.wlyy.config;
|
|
|
|
|
|
import com.yihu.wlyy.util.SystemConf;
|
|
|
import org.apache.activemq.ActiveMQConnectionFactory;
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
import org.springframework.context.annotation.Primary;
|
|
|
import org.springframework.context.annotation.Profile;
|
|
|
import org.springframework.jms.annotation.EnableJms;
|
|
|
import org.springframework.jms.connection.CachingConnectionFactory;
|
|
|
import org.springframework.jms.core.JmsTemplate;
|
|
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
|
|
|
|
|
import java.io.File;
|
|
|
|
|
|
/**
|
|
|
* Created by chenweida on 2017/9/9.
|
|
|
* 生产者配置
|
|
|
*/
|
|
|
@EnableJms
|
|
|
@Configuration
|
|
|
@Profile({"dev", "devtest", "prod", "test"})
|
|
|
public class UploadImagConfig extends WebMvcConfigurerAdapter {
|
|
|
// @Value("${activemq.username}")
|
|
|
// private String username;
|
|
|
// @Value("${activemq.password}")
|
|
|
// private String password;
|
|
|
// @Value("${activemq.url}")
|
|
|
// private String url;
|
|
|
|
|
|
@Override
|
|
|
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
|
|
String tempPath = SystemConf.getInstance().getTempPath() + File.separator;
|
|
|
registry.addResourceHandler(tempPath+"**").addResourceLocations("F:/"+tempPath);
|
|
|
|
|
|
super.addResourceHandlers(registry);
|
|
|
|
|
|
}
|
|
|
}
|