Add static resources.

This commit is contained in:
Paulo Gustavo Veiga 2023-11-27 21:47:22 -08:00
parent 079f8ac417
commit fa06852806
6 changed files with 10 additions and 9 deletions

View File

@ -7,6 +7,7 @@ import org.springframework.context.annotation.ImportResource;
import org.springframework.web.servlet.HandlerExceptionResolver; import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.ViewResolver; import org.springframework.web.servlet.ViewResolver;
import org.springframework.web.servlet.config.annotation.EnableWebMvc; 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.WebMvcConfigurer;
import org.springframework.web.servlet.handler.SimpleMappingExceptionResolver; import org.springframework.web.servlet.handler.SimpleMappingExceptionResolver;
import org.springframework.web.servlet.view.InternalResourceViewResolver; import org.springframework.web.servlet.view.InternalResourceViewResolver;
@ -18,12 +19,12 @@ import org.springframework.web.servlet.view.JstlView;
@ImportResource(value = {"classpath:spring/wisemapping-servlet.xml"}) @ImportResource(value = {"classpath:spring/wisemapping-servlet.xml"})
@ComponentScan("com.wisemapping.webmvc") @ComponentScan("com.wisemapping.webmvc")
public class MvcAppConfig implements WebMvcConfigurer { public class MvcAppConfig implements WebMvcConfigurer {
// @Override @Override
// public void addResourceHandlers(ResourceHandlerRegistry registry) { public void addResourceHandlers(ResourceHandlerRegistry registry) {
// registry registry
// .addResourceHandler("/**") .addResourceHandler("/**")
// .addResourceLocations("classpath:/public/"); .addResourceLocations("classpath:/public/");
// } }
@Bean @Bean
public ViewResolver viewResolver() { public ViewResolver viewResolver() {

View File

@ -181,4 +181,4 @@ spring.h2.console.enabled=true
spring.h2.console.path=/h2-ui spring.h2.console.path=/h2-ui
logging.level.root=TRACE logging.level.root=DEBUG

View File

@ -0,0 +1 @@
../../../../../../wise-ui/target/wisemapping-mindplot/package/dist

View File

@ -0,0 +1 @@
../../../../../../wise-ui/target/wisemapping-webapp/package/dist

View File

@ -1 +0,0 @@
../../../../../wise-ui/target/wisemapping-mindplot/package/dist

View File

@ -1 +0,0 @@
../../../../../wise-ui/target/wisemapping-webapp/package/dist