From 93af1c6ffb9ae0e894689ad3a37b548e57d54cff Mon Sep 17 00:00:00 2001
From: linzhijie <19970921lzj>
Date: 星期四, 11 三月 2021 19:10:07 +0800
Subject: [PATCH] 有注释的测评系统业务代码

---
 src/main/java/com/ots/OtsApplication.java |   36 +++++++++---------------------------
 1 files changed, 9 insertions(+), 27 deletions(-)

diff --git a/src/main/java/com/ots/OtsApplication.java b/src/main/java/com/ots/OtsApplication.java
index 37c99c0..38d48e2 100644
--- a/src/main/java/com/ots/OtsApplication.java
+++ b/src/main/java/com/ots/OtsApplication.java
@@ -1,30 +1,18 @@
 package com.ots;
-import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
-import org.jasypt.encryption.StringEncryptor;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.boot.CommandLineRunner;
+
 import org.springframework.boot.SpringApplication;
 import org.springframework.boot.autoconfigure.SpringBootApplication;
 import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
-import org.springframework.context.ApplicationContext;
-import org.springframework.core.env.Environment;
 
+/**
+ * 鍚姩绋嬪簭
+ *
+ * @author ots
+ */
 @SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
-@EnableEncryptableProperties
-public class OtsApplication implements CommandLineRunner {
-
-    private static final Logger l = LoggerFactory.getLogger(OtsApplication.class);
-
-    @Autowired
-    private StringEncryptor stringEncryptor;
-
-    @Autowired
-    private ApplicationContext applicationContext;
-
+public class OtsApplication {
     public static void main(String[] args) {
-        
+        // System.setProperty("spring.devtools.restart.enabled", "false");
         SpringApplication.run(OtsApplication.class, args);
         StringBuilder builder = new StringBuilder();
         builder.append("********************************************************************\n");
@@ -35,10 +23,4 @@
         builder.append("********************************************************************\n");
         System.out.println(builder.toString());
     }
-
-    @Override
-    public void run(String... args) throws Exception {
-        Environment environment = applicationContext.getEnvironment();
-        l.info(stringEncryptor.encrypt(environment.getProperty("password")));
-    }
-}
+}
\ No newline at end of file

--
Gitblit v1.9.1