コード例 #1
0
ファイル: WebConfigurer.java プロジェクト: PolGuillen/LigaB
 /** Set up Mime types. */
 @Override
 public void customize(ConfigurableEmbeddedServletContainer container) {
   MimeMappings mappings = new MimeMappings(MimeMappings.DEFAULT);
   // IE issue, see https://github.com/jhipster/generator-jhipster/pull/711
   mappings.add("html", "text/html;charset=utf-8");
   // CloudFoundry issue, see https://github.com/cloudfoundry/gorouter/issues/64
   mappings.add("json", "text/html;charset=utf-8");
   container.setMimeMappings(mappings);
 }
 /** Customize the Servlet engine: Mime types, the document root, the cache. */
 @Override
 public void customize(ConfigurableEmbeddedServletContainer container) {
   MimeMappings mappings = new MimeMappings(MimeMappings.DEFAULT);
   // IE issue, see https://github.com/jhipster/generator-jhipster/pull/711
   mappings.add("html", "text/html;charset=utf-8");
   // CloudFoundry issue, see https://github.com/cloudfoundry/gorouter/issues/64
   mappings.add("json", "text/html;charset=utf-8");
   container.setMimeMappings(mappings);
   // When running in an IDE or with ./mvnw spring-boot:run, set location of the static web assets.
   setLocationForStaticAssets(container);
 }
コード例 #3
0
 @Override
 public void customize(ConfigurableEmbeddedServletContainer container) {
   MimeMappings mappings = new MimeMappings(MimeMappings.DEFAULT);
   mappings.add("html", "text/html;charset=utf-8");
   container.setMimeMappings(mappings);
 }