You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
package com ;
// 导入MyBatis的Mapper扫描注解
import org.mybatis.spring.annotation.MapperScan ;
// 导入Spring Boot核心启动类
import org.springframework.boot.SpringApplication ;
// 导入Spring Boot自动配置注解
import org.springframework.boot.autoconfigure.SpringBootApplication ;
// 导入Spring应用构建器
import org.springframework.boot.builder.SpringApplicationBuilder ;
// 导入Servlet组件扫描注解
import org.springframework.boot.web.servlet.ServletComponentScan ;
// 导入Spring Boot Servlet初始化器
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer ;
// 主应用类, 使用SpringBootApplication注解标识为Spring Boot应用
@SpringBootApplication
// 扫描指定包下的Servlet组件
@ServletComponentScan ( value = "com.ServletContextListener" )
// 扫描指定包下的MyBatis Mapper接口
@MapperScan ( basePackages = { "com.dao" } )
public class jianshenfangglApplication extends SpringBootServletInitializer {
// 应用主入口方法
public static void main ( String [ ] args ) {
// 启动Spring Boot应用
SpringApplication . run ( jianshenfangglApplication . class , args ) ;
}
// 重写configure方法用于外部容器部署
@Override
protected SpringApplicationBuilder configure ( SpringApplicationBuilder applicationBuilder ) {
// 配置应用源
return applicationBuilder . sources ( jianshenfangglApplication . class ) ;
}
}