ViontechApplication.java
1.17 KB
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;
@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() {
return new ViontechPropertyPlaceholderConfigurer();
}
}