guang
2023-05-05 566411019444e53ca143298ee490d33cf510e28c
提交 | 用户 | age
9e1c8d 1 package com.hx.other.service;
G 2
3 import com.hx.other.service.config.UniqueNameGenerator;
4 import com.thebeastshop.forest.springboot.annotation.ForestScan;
5 import org.springframework.boot.CommandLineRunner;
6 import org.springframework.boot.SpringApplication;
7 import org.springframework.boot.builder.SpringApplicationBuilder;
8 import org.springframework.boot.web.servlet.ServletComponentScan;
9 import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
10 import org.springframework.boot.autoconfigure.SpringBootApplication;
11 import org.springframework.context.annotation.ComponentScan;
12 import org.mybatis.spring.annotation.MapperScan;
13 import com.hx.util.AesUtil;
14
15 @SpringBootApplication
16 @MapperScan({"com.gitee.sunchenbin.mybatis.actable.dao.*","com.hx.other.service.dao.*"})
17 @ComponentScan(basePackages = {"com.gitee.sunchenbin.mybatis.actable.manager.*","com.hx.other.service.*","com.hx.common.*"},nameGenerator = UniqueNameGenerator.class)
18 @ServletComponentScan
19 @ForestScan(basePackages = "com.hx.other.service.api.*")
20 public class PhiOtherService extends SpringBootServletInitializer implements CommandLineRunner {
21
22     public static void main(String[] args) {
23         SpringApplication.run(PhiOtherService.class, args);
24     }
25
26     @Override
27     protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
28         return builder.sources(PhiOtherService.class);
29     }
30
31     @Override
32     public void run(String... args) throws Exception {
33         System.out.println("SpringBoot is Running...");
34     }
35 }