You cannot 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.4 KiB
Java
41 lines
1.4 KiB
Java
|
6 years ago
|
package com.gszc;
|
||
|
6 years ago
|
|
||
|
|
import org.slf4j.Logger;
|
||
|
|
import org.slf4j.LoggerFactory;
|
||
|
|
import org.springframework.boot.SpringApplication;
|
||
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||
|
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||
|
|
import org.springframework.stereotype.Controller;
|
||
|
|
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||
|
|
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
|
||
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||
|
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||
|
|
import tk.mybatis.spring.annotation.MapperScan;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* @author yaoyao.zhu
|
||
|
|
* @since
|
||
|
|
*/
|
||
|
|
@Controller
|
||
|
|
@EnableWebMvc
|
||
|
|
@SpringBootApplication
|
||
|
|
@EnableConfigurationProperties
|
||
|
|
@MapperScan(basePackages = "com.medical.insideweb.mapper")
|
||
|
|
public class Application extends WebMvcConfigurerAdapter implements WebMvcConfigurer {
|
||
|
|
|
||
|
|
|
||
|
|
private Logger logger = LoggerFactory.getLogger(Application.class);
|
||
|
|
|
||
|
|
public static void main(String[] args) {
|
||
|
|
|
||
|
|
SpringApplication.run(Application.class, args);
|
||
|
|
}
|
||
|
|
|
||
|
|
@Override
|
||
|
|
public void addResourceHandlers(ResourceHandlerRegistry registry) {
|
||
|
|
registry.addResourceHandler("doc.html").addResourceLocations("classpath:/META-INF/resources/");
|
||
|
|
registry.addResourceHandler("/webjars/**").addResourceLocations("classpath:/META-INF/resources/webjars/");
|
||
|
|
}
|
||
|
|
|
||
|
|
}
|