Commit 3fec1885 by xmh

添加运行参数,添加ignore

1 parent 9e77058f
**/**/target/
**/**/.idea/
**/**/*.iml
\ No newline at end of file
package com.viontech;
import com.viontech.domain.ViontechAESUtil;
import com.viontech.domain.ViontechPropertyPlaceholderConfigurer;
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import javax.annotation.Resource;
@SpringBootApplication(scanBasePackages = {"com.viontech.*"})
public class ViontechApplication extends SpringBootServletInitializer {
public static void main(String[] args) {
if (args.length == 0) {
return;
}
String str = args[0];
String[] split = str.split(",");
for (String s : split) {
if (s != null) {
System.out.println(ViontechPropertyPlaceholderConfigurer.KEY + ViontechAESUtil.getEncryptString(s));
}
}
SpringApplication.run(ViontechApplication.class, args);
}
@Bean
public static PropertyPlaceholderConfigurer properties(){
public static PropertyPlaceholderConfigurer properties() {
return new ViontechPropertyPlaceholderConfigurer();
}
}
......@@ -15,7 +15,7 @@ import java.util.Properties;
@Configuration
@Component(value = "viontechPropertyConfigurer")
public class ViontechPropertyPlaceholderConfigurer extends PropertyPlaceholderConfigurer{
private final String KEY = "VIONTECH";
public static final String KEY = "VIONTECH";
@Override
public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory) throws BeansException {
try {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!