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.
41 lines
1.3 KiB
41 lines
1.3 KiB
package com.stone;
|
|
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.LoggerFactory;
|
|
import org.springframework.boot.CommandLineRunner;
|
|
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.scheduling.annotation.EnableScheduling;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
|
import tk.mybatis.spring.annotation.MapperScan;
|
|
|
|
/**
|
|
* @author zichen
|
|
*/
|
|
@Controller
|
|
@EnableWebMvc
|
|
@SpringBootApplication
|
|
@MapperScan(basePackages = "com.stone.mapper")
|
|
public class Application extends SpringBootServletInitializer implements CommandLineRunner {
|
|
|
|
private Logger logger = LoggerFactory.getLogger(Application.class);
|
|
|
|
public static void main(String[] args) {
|
|
SpringApplication.run(Application.class, args);
|
|
}
|
|
|
|
/*// 生产环境
|
|
@Override
|
|
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
|
|
return application.sources(Application.class);
|
|
}*/
|
|
|
|
@Override
|
|
public void run(String... args) {
|
|
logger.info("服务启动完成!");
|
|
}
|
|
|
|
}
|
|
|