|
|
@@ -7,10 +7,10 @@
|
|
|
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
|
|
* the Software, and to permit persons to whom the Software is furnished to do so,
|
|
|
* subject to the following conditions:
|
|
|
-
|
|
|
+ * <p>
|
|
|
* The above copyright notice and this permission notice shall be included in all
|
|
|
* copies or substantial portions of the Software.
|
|
|
-
|
|
|
+ * <p>
|
|
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
|
|
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
|
|
@@ -21,52 +21,43 @@
|
|
|
|
|
|
package net.mingsoft;
|
|
|
|
|
|
-import net.mingsoft.people.action.web.PeopleAction;
|
|
|
import org.mybatis.spring.annotation.MapperScan;
|
|
|
import org.springframework.boot.Banner;
|
|
|
import org.springframework.boot.SpringApplication;
|
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
import org.springframework.boot.web.servlet.ServletComponentScan;
|
|
|
import org.springframework.context.ConfigurableApplicationContext;
|
|
|
-import org.springframework.context.annotation.ComponentScan;
|
|
|
-import org.springframework.context.annotation.FilterType;
|
|
|
import org.springframework.core.env.Environment;
|
|
|
|
|
|
-import java.util.logging.Logger;
|
|
|
-
|
|
|
@SpringBootApplication(scanBasePackages = {"net.mingsoft"})
|
|
|
-@MapperScan(basePackages={"**.dao","com.baomidou.**.mapper"})
|
|
|
+@MapperScan(basePackages = {"**.dao", "com.baomidou.**.mapper"})
|
|
|
@ServletComponentScan(basePackages = {"net.mingsoft"})
|
|
|
-@ComponentScan(excludeFilters = @ComponentScan.Filter(
|
|
|
- type = FilterType.ASSIGNABLE_TYPE,
|
|
|
- classes = {PeopleAction.class}))
|
|
|
public class MSApplication {
|
|
|
- public static void main(String[] args) {
|
|
|
- SpringApplication springApplication = new SpringApplication(MSApplication.class);
|
|
|
- springApplication.setBannerMode(Banner.Mode.OFF);
|
|
|
- ConfigurableApplicationContext configurableApplicationContext = springApplication.run(args);
|
|
|
- Environment env = configurableApplicationContext.getEnvironment();
|
|
|
- String port = env.getProperty("server.port", "8080");
|
|
|
- String managerPath = env.getProperty("ms.manager.path", "");
|
|
|
- String profiles = String.join(", ", env.getActiveProfiles());
|
|
|
-
|
|
|
- System.out.printf(
|
|
|
- "\n" +
|
|
|
- "\033[1;36m" + // 青色加粗
|
|
|
- "╔══════════════════════════════════════════════════════════╗\n" +
|
|
|
- "║ \033[1;33m🚀 MCms Application Started Successfully! \033[1;36m ║\n" +
|
|
|
- "╠══════════════════════════════════════════════════════════╣\n" +
|
|
|
- "║ \033[0;32m➜ Manager URL: \033[0;33mhttp://localhost:%s\033[1;36m%s\033[1;36m/login.do ║\n" +
|
|
|
- "║ \033[0;32m➜ Front URL: \033[0;33mhttp://localhost:%s/\033[1;36m ║\n" +
|
|
|
- "║ \033[0;32m➜ Activate Profiles: \033[0;35m%s\033[1;36m ║\n" +
|
|
|
- "╚══════════════════════════════════════════════════════════╝" +
|
|
|
- "\033[0m", // 重置颜色
|
|
|
- port,
|
|
|
- managerPath,
|
|
|
- port,
|
|
|
- profiles
|
|
|
- );
|
|
|
- }
|
|
|
+ public static void main(String[] args) {
|
|
|
+ SpringApplication springApplication = new SpringApplication(MSApplication.class);
|
|
|
+ springApplication.setBannerMode(Banner.Mode.OFF);
|
|
|
+ ConfigurableApplicationContext configurableApplicationContext = springApplication.run(args);
|
|
|
+ Environment env = configurableApplicationContext.getEnvironment();
|
|
|
+ String port = env.getProperty("server.port", "8080");
|
|
|
+ String managerPath = env.getProperty("ms.manager.path", "");
|
|
|
+ String profiles = String.join(", ", env.getActiveProfiles());
|
|
|
+ System.out.printf(
|
|
|
+ "\n" +
|
|
|
+ "\033[1;36m" + // 青色加粗
|
|
|
+ "╔══════════════════════════════════════════════════════════╗\n" +
|
|
|
+ "║ \033[1;33m🚀 MCms Application Started Successfully! \033[1;36m ║\n" +
|
|
|
+ "╠══════════════════════════════════════════════════════════╣\n" +
|
|
|
+ "║ \033[0;32m➜ Manager URL: \033[0;33mhttp://localhost:%s\033[1;36m%s\033[1;36m/login.do ║\n" +
|
|
|
+ "║ \033[0;32m➜ Front URL: \033[0;33mhttp://localhost:%s/\033[1;36m ║\n" +
|
|
|
+ "║ \033[0;32m➜ Activate Profiles: \033[0;35m%s\033[1;36m ║\n" +
|
|
|
+ "╚══════════════════════════════════════════════════════════╝" +
|
|
|
+ "\033[0m", // 重置颜色
|
|
|
+ port,
|
|
|
+ managerPath,
|
|
|
+ port,
|
|
|
+ profiles
|
|
|
+ );
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|