MobileApiApplication.java
1.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package com.glsx.shop;
import com.github.tobato.fastdfs.FdfsClientConfig;
import com.glsx.shop.config.WxProperties;
import com.glsx.shop.dao.BaseRepositoryFactoryBean;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Import;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
/**
* ApiApplication
*
* @author glsx
* @version 2018/9/11 0011
*/
@EnableCaching
@SpringBootApplication
@ServletComponentScan(basePackages = "com.glsx.shop")
@EntityScan(basePackages = "com.glsx.shop.bean.entity")
@EnableJpaRepositories(basePackages = "com.glsx.shop.dao", repositoryFactoryBeanClass = BaseRepositoryFactoryBean.class)
@EnableJpaAuditing
@EnableConfigurationProperties(WxProperties.class)
@Import(FdfsClientConfig.class)
public class MobileApiApplication extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(MobileApiApplication.class);
}
public static void main(String[] args) {
SpringApplication.run(MobileApiApplication.class);
}
}