41 lines
1.6 KiB
Java
41 lines
1.6 KiB
Java
package com.mcwl;
|
|
|
|
import com.fasterxml.jackson.databind.SerializationFeature;
|
|
import org.mybatis.spring.annotation.MapperScan;
|
|
import org.springframework.boot.SpringApplication;
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer;
|
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
|
import org.springframework.context.annotation.Bean;
|
|
|
|
/**
|
|
* 启动程序
|
|
*
|
|
* @author mcwl
|
|
*/
|
|
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class })
|
|
public class McWlApplication
|
|
{
|
|
public static void main(String[] args)
|
|
{
|
|
// System.setProperty("spring.devtools.restart.enabled", "false");
|
|
SpringApplication.run(McWlApplication.class, args);
|
|
System.out.println("(♥◠‿◠)ノ゙ 魔创未来启动成功 ლ(´ڡ`ლ)゙ \n" +
|
|
" .-------. ____ __ \n" +
|
|
" | _ _ \\ \\ \\ / / \n" +
|
|
" | ( ' ) | \\ _. / ' \n" +
|
|
" |(_ o _) / _( )_ .' \n" +
|
|
" | (_,_).' __ ___(_ o _)' \n" +
|
|
" | |\\ \\ | || |(_,_)' \n" +
|
|
" | | \\ `' /| `-' / \n" +
|
|
" | | \\ / \\ / \n" +
|
|
" ''-' `'-' `-..-' ");
|
|
}
|
|
|
|
// 序列化枚举值为前端返回值
|
|
@Bean
|
|
public Jackson2ObjectMapperBuilderCustomizer customizer() {
|
|
return builder -> builder.featuresToEnable(SerializationFeature.WRITE_ENUMS_USING_TO_STRING);
|
|
}
|
|
}
|