RuoYiApplication.java 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. package com.ruoyi;
  2. import com.ruoyi.common.utils.AesUtil;
  3. import org.springframework.boot.SpringApplication;
  4. import org.springframework.boot.autoconfigure.SpringBootApplication;
  5. import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
  6. import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
  7. import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
  8. import org.springframework.boot.web.servlet.MultipartConfigFactory;
  9. import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
  10. import org.springframework.context.annotation.Bean;
  11. import javax.crypto.Cipher;
  12. import javax.crypto.spec.SecretKeySpec;
  13. import javax.crypto.IllegalBlockSizeException;
  14. import javax.crypto.NoSuchPaddingException;
  15. import javax.crypto.spec.SecretKeySpec;
  16. import javax.servlet.MultipartConfigElement;
  17. import java.security.InvalidKeyException;
  18. import java.security.NoSuchAlgorithmException;
  19. import org.apache.commons.codec.binary.Base64;
  20. import org.springframework.scheduling.annotation.EnableAsync;
  21. /**
  22. * 启动程序
  23. *
  24. * @author ruoyi
  25. */
  26. @SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
  27. @EnableAsync
  28. public class RuoYiApplication
  29. {
  30. public static void main(String[] args)
  31. {
  32. // System.setProperty("spring.devtools.restart.enabled", "false");
  33. SpringApplication.run(RuoYiApplication.class, args);
  34. System.out.println("(♥◠‿◠)ノ゙ CPMS启动成功 ლ(´ڡ`ლ)゙");
  35. }
  36. @Bean
  37. MultipartConfigElement multipartConfigElement() {
  38. MultipartConfigFactory factory = new MultipartConfigFactory();
  39. factory.setLocation("/u03/tmp");
  40. return factory.createMultipartConfig();
  41. }
  42. }