Solucionado (ver solução)
Solucionado
(ver solução)
3
respostas

Como Criar o Projeto usando InteliJ Spring Initializr?

Eu tenho usado o InteliJ para fazer os cursos em Java, mas nesse tive um problema com o projeto, ao invés de usar o Jboss Force, pensei em utilizar o Spring Initializr(Spring boot) para criar o projeto, daria certo? Pois tentei de diversas maneiras utilizando esse método e deu errado todas as vezes. Todas as vezes no caso foi durante a execução do Tomcat. Seria possível?

O último erro que obtive:

02:22:04.066 [http-nio-8080-exec-1] DEBUG org.springframework.web.servlet.DispatcherServlet - Initializing servlet 'dispatcher'
02:22:04.067 [http-nio-8080-exec-1] INFO org.springframework.web.servlet.DispatcherServlet - FrameworkServlet 'dispatcher': initialization started
02:22:04.067 [http-nio-8080-exec-1] DEBUG org.springframework.web.context.support.AnnotationConfigWebApplicationContext - Refreshing WebApplicationContext for namespace 'dispatcher-servlet'
02:22:04.094 [http-nio-8080-exec-1] DEBUG org.springframework.web.context.support.AnnotationConfigWebApplicationContext - Registering annotated classes: [class br.com.gustavostz.casadocodigo.loja.conf.AppWebConfiguration]
02:22:04.095 [http-nio-8080-exec-1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor'
02:22:04.103 [http-nio-8080-exec-1] DEBUG org.springframework.context.annotation.ClassPathBeanDefinitionScanner - Identified candidate component class: file [C:\Users\Pc Gamer\OneDrive - Associacao Antonio Vieira\Estudos\Alura\Formacoes\DevJava\Spring\casadocodigo\out\artifacts\casadocodigo_war_exploded\WEB-INF\classes\br\com\gustavostz\casadocodigo\loja\controllers\HomeController.class]
02:22:04.106 [http-nio-8080-exec-1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.event.internalEventListenerProcessor'
02:22:04.107 [http-nio-8080-exec-1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.event.internalEventListenerFactory'
02:22:04.107 [http-nio-8080-exec-1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor'
02:22:04.110 [http-nio-8080-exec-1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalCommonAnnotationProcessor'
02:22:04.110 [http-nio-8080-exec-1] DEBUG org.springframework.ui.context.support.UiApplicationContextUtils - Unable to locate ThemeSource with name 'themeSource': using default [org.springframework.ui.context.support.ResourceBundleThemeSource@749afca8]
02:22:04.110 [http-nio-8080-exec-1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'appWebConfiguration'
02:22:04.110 [http-nio-8080-exec-1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'homeController'
02:22:04.110 [http-nio-8080-exec-1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration'
02:22:04.111 [http-nio-8080-exec-1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'requestMappingHandlerMapping'
02:22:04.112 [http-nio-8080-exec-1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'mvcConversionService'
02:22:04.113 [http-nio-8080-exec-1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'mvcResourceUrlProvider'
02:22:04.113 [http-nio-8080-exec-1] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Creating shared instance of singleton bean 'mvcContentNegotiationManager'
02:22:04.115 [http-nio-8080-exec-1] DEBUG org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping - Looking for request mappings in application context: WebApplicationContext for namespace 'dispatcher-servlet', started on Thu Aug 08 02:22:04 BRT 2019
02:22:04.116 [http-nio-8080-exec-1] WARN org.springframework.web.context.support.AnnotationConfigWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' 

Erro completo: https://textuploader.com/11h5e

3 respostas
solução!

Você está tentando usar a versão 4.1.0.RELEASE do spring-webmvc? Posta o pom.xml gerado, por favor

Verdade, está ae o erro, havia duas dependencias spring-webmvc, uma quando o pom.xml havia sido criado e a outra que copiei do curso, logo ele acabou usando a primeira

Perfeito amigo :D