simulation-backend/src/main/java/com/hivekion/DemoApplication.java

35 lines
1.2 KiB
Java
Raw Normal View History

2025-08-07 18:04:07 +08:00
package com.hivekion;
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.ComponentScan;
import java.time.LocalDate;
import java.time.LocalTime;
@SpringBootApplication
2025-09-11 14:29:58 +08:00
@MapperScan({"com.hivekion.**.mapper"})
@ComponentScan(basePackages = { "com.hivekion.*"})
2025-08-07 18:04:07 +08:00
public class DemoApplication extends SpringBootServletInitializer {
private static Logger log = LoggerFactory.getLogger(DemoApplication.class);
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
log.info(
"《《《《《《 JAVAFRAME started up successfully at {} {} 》》》》》》",
LocalDate.now(),
LocalTime.now());
}
@Override // 为了打包springboot项目
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return builder.sources(this.getClass());
}
}