New file |
| | |
| | | package com.dsh; |
| | | |
| | | |
| | | import cn.mb.cloud.common.core.annotation.MBCloudApplication; |
| | | import cn.mb.cloud.common.data.web.WebConfig; |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.cloud.openfeign.EnableFeignClients; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Import; |
| | | import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | import springfox.documentation.swagger2.annotations.EnableSwagger2; |
| | | |
| | | import javax.annotation.PostConstruct; |
| | | import java.util.TimeZone; |
| | | |
| | | /** |
| | | * @author jason |
| | | */ |
| | | @EnableSwagger2 |
| | | @EnableScheduling |
| | | @EnableFeignClients |
| | | @MBCloudApplication |
| | | @Import({WebConfig.class}) |
| | | @MapperScan("com.dsh.communityWorldCup.mapper") |
| | | public class CommunityWorldCupApplication { |
| | | public static void main(String[] args) { |
| | | SpringApplication.run(CommunityWorldCupApplication.class, args); |
| | | } |
| | | |
| | | @Bean |
| | | public static PropertySourcesPlaceholderConfigurer placeholderConfigurer() { |
| | | PropertySourcesPlaceholderConfigurer c = new PropertySourcesPlaceholderConfigurer(); |
| | | c.setIgnoreUnresolvablePlaceholders(true); |
| | | return c; |
| | | } |
| | | |
| | | @PostConstruct |
| | | void started() { |
| | | TimeZone.setDefault(TimeZone.getTimeZone("GMT+8")); |
| | | } |
| | | } |