톰캣설정 수정(폰트 응답 mime타입 수정)
parent
76c81a1c7a
commit
d2f49d78b6
@ -0,0 +1,19 @@
|
||||
package cokr.xit.base;
|
||||
|
||||
|
||||
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
|
||||
import org.springframework.boot.web.server.MimeMappings;
|
||||
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
public class ServletCustomizer implements WebServerFactoryCustomizer<TomcatServletWebServerFactory> {
|
||||
@Override
|
||||
public void customize(TomcatServletWebServerFactory factory) {
|
||||
MimeMappings mappings = new MimeMappings(MimeMappings.DEFAULT);
|
||||
mappings.add("woff", "font/woff");
|
||||
mappings.add("woff2", "font/woff2");
|
||||
mappings.add("otf", "font/otf");
|
||||
factory.setMimeMappings(mappings);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue