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

Erro 404

O servidor sobe, mas sempre fica com erro 404.

Configuração

package br.com.netsoft.desif;

import org.springframework.context.MessageSource; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.support.ReloadableResourceBundleMessageSource; import org.springframework.format.datetime.DateFormatter; import org.springframework.format.datetime.DateFormatterRegistrar; import org.springframework.format.support.DefaultFormattingConversionService; import org.springframework.format.support.FormattingConversionService; import org.springframework.web.multipart.MultipartResolver; import org.springframework.web.multipart.support.StandardServletMultipartResolver; import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.view.InternalResourceViewResolver;

import br.com.netsoft.desif.controller.HomeController;

@EnableWebMvc @ComponentScan(basePackageClasses = { HomeController.class }) public class AppWebConfiguration {

@Bean public InternalResourceViewResolver internalResourceViewResolver() { InternalResourceViewResolver resolver = new InternalResourceViewResolver(); resolver.setPrefix("/WEB-INF/views/"); resolver.setSuffix(".jsp"); return resolver; }

@Bean public MessageSource messageSource() { ReloadableResourceBundleMessageSource messageSource = new ReloadableResourceBundleMessageSource(); messageSource.setBasename("/WEB-INF/messages"); messageSource.setDefaultEncoding("UTF-8"); messageSource.setCacheSeconds(1);

return messageSource; }

@Bean public FormattingConversionService mvcConversionService() { DefaultFormattingConversionService conversionService = new DefaultFormattingConversionService();

DateFormatterRegistrar registrar = new DateFormatterRegistrar(); registrar.setFormatter(new DateFormatter("dd/MM/yyyy")); registrar.registerFormatters(conversionService);

return conversionService; }

@Bean public MultipartResolver multipartResolver() { return new StandardServletMultipartResolver(); } }

Controller

package br.com.netsoft.desif.controller;

import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping;

@Controller public class HomeController {

@RequestMapping("/") public String index() { System.out.println("Entrando na home"); return "index"; }

@RequestMapping("/alterarSenha") public void alterarSenha() { System.out.println("Entrando na alterarSenha"); } }

13 respostas

Bom dia Guilherme, primeiro da uma olhada no console se ele printou a mensagem "Entrando na home" para sabermos se está entrando no controller. Depois verifica sua classe que herda de AbstractcAnnotation.... se está retornando sua classe de configuração web

Ele não printou a mensagem "Entrando na home".

Acho que está. Código abaixo.

package br.com.netsoft.desif;

import javax.servlet.Filter; import javax.servlet.MultipartConfigElement; import javax.servlet.ServletRegistration.Dynamic;

import org.springframework.web.filter.CharacterEncodingFilter; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;

public class ServletSpringMVC extends AbstractAnnotationConfigDispatcherServletInitializer {

@Override protected Class<?>[] getRootConfigClasses() { return null; }

@Override protected Class<?>[] getServletConfigClasses() { return new Class[] { AppWebConfiguration.class, JPAConfiguration.class }; }

@Override protected String[] getServletMappings() { return new String[] { "/" }; }

@Override protected Filter[] getServletFilters() { CharacterEncodingFilter encodingFilter = new CharacterEncodingFilter(); encodingFilter.setEncoding("UTF-8"); return new Filter[] { encodingFilter }; }

@Override protected void customizeRegistration(Dynamic registration) { registration.setMultipartConfig(new MultipartConfigElement("")); } }

Está certo mesmo, seu projeto está deployado no tomcat? Pergunto porque as vezes eu retiro para limpar o servidor ou algo do tipo e esqueço de colocar novamente!

Está certo mesmo, seu projeto está deployado no tomcat?

Não entendi.

Eu código realmente está correto. Dá uma olhada no Add and Remove do tomcat pra ver se o projeto está em deploy

Está.

Tirei e depois voltei. Mas tem algo errado.

Console

ago 25, 2017 11:22:57 AM org.apache.tomcat.util.digester.SetPropertiesRule begin ADVERTÊNCIA: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:desif' did not find a matching property. ago 25, 2017 11:22:57 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Server version: Apache Tomcat/8.5.20 ago 25, 2017 11:22:57 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Server built: Aug 2 2017 21:35:49 UTC ago 25, 2017 11:22:57 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Server number: 8.5.20.0 ago 25, 2017 11:22:57 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: OS Name: Windows 10 ago 25, 2017 11:22:57 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: OS Version: 10.0 ago 25, 2017 11:22:57 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Architecture: amd64 ago 25, 2017 11:22:57 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Java Home: C:\Program Files\Java\jre1.8.0_131 ago 25, 2017 11:22:57 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: JVM Version: 1.8.0_131-b11 ago 25, 2017 11:22:57 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: JVM Vendor: Oracle Corporation ago 25, 2017 11:22:57 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: CATALINA_BASE: C:\Netsoft\workspace_sts.metadata.plugins\org.eclipse.wst.server.core\tmp0 ago 25, 2017 11:22:57 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: CATALINA_HOME: C:\Program Files\Apache Software Foundation\Tomcat 8.5 ago 25, 2017 11:22:57 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:53954 ago 25, 2017 11:22:57 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Dcatalina.base=C:\Netsoft\workspace_sts.metadata.plugins\org.eclipse.wst.server.core\tmp0 ago 25, 2017 11:22:57 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 8.5 ago 25, 2017 11:22:57 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Dwtp.deploy=C:\Netsoft\workspace_sts.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps ago 25, 2017 11:22:57 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 8.5\endorsed ago 25, 2017 11:22:57 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Dfile.encoding=Cp1252 ago 25, 2017 11:22:57 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFORMAÇÕES: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\Java\jre1.8.0_131\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre1.8.0_131/bin/server;C:/Program Files/Java/jre1.8.0_131/bin;C:/Program Files/Java/jre1.8.0_131/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\Java\jdk1.8.0_131\bin;C:\Program Files\Git\cmd;C:\Program Files\OpenVPN\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Netsoft\maven\apache-maven-3.5.0\bin;C:\Users\Guilherme Costa\AppData\Local\Microsoft\WindowsApps;;C:\Netsoft\sts-bundle\sts-3.8.4.RELEASE;;.] ago 25, 2017 11:22:57 AM org.apache.coyote.AbstractProtocol init INFORMAÇÕES: Initializing ProtocolHandler ["http-nio-8080"] ago 25, 2017 11:22:57 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector INFORMAÇÕES: Using a shared selector for servlet write/read ago 25, 2017 11:22:57 AM org.apache.coyote.AbstractProtocol init INFORMAÇÕES: Initializing ProtocolHandler ["ajp-nio-8009"] ago 25, 2017 11:22:57 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector INFORMAÇÕES: Using a shared selector for servlet write/read ago 25, 2017 11:22:57 AM org.apache.catalina.startup.Catalina load INFORMAÇÕES: Initialization processed in 1079 ms ago 25, 2017 11:22:57 AM org.apache.catalina.core.StandardService startInternal INFORMAÇÕES: Starting service [Catalina] ago 25, 2017 11:22:57 AM org.apache.catalina.core.StandardEngine startInternal INFORMAÇÕES: Starting Servlet Engine: Apache Tomcat/8.5.20 ago 25, 2017 11:22:58 AM org.apache.jasper.servlet.TldScanner scanJars INFORMAÇÕES: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. ago 25, 2017 11:22:58 AM org.apache.catalina.core.ApplicationContext log INFORMAÇÕES: No Spring WebApplicationInitializer types detected on classpath ago 25, 2017 11:22:58 AM org.apache.coyote.AbstractProtocol start INFORMAÇÕES: Starting ProtocolHandler ["http-nio-8080"] ago 25, 2017 11:22:58 AM org.apache.coyote.AbstractProtocol start INFORMAÇÕES: Starting ProtocolHandler ["ajp-nio-8009"] ago 25, 2017 11:22:58 AM org.apache.catalina.startup.Catalina start INFORMAÇÕES: Server startup in 869 ms

Ele não está subindo o spring. Limpa o projeto, limpar o tomcat e tenta denovo. Pois não está carregando mesmo a ServletDispatcher

Agora subiu, mas continua com 404.

Console

ago 25, 2017 11:29:22 AM org.apache.tomcat.util.digester.SetPropertiesRule begin ADVERTÊNCIA: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:desif' did not find a matching property. ago 25, 2017 11:29:22 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Server version: Apache Tomcat/8.5.20 ago 25, 2017 11:29:22 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Server built: Aug 2 2017 21:35:49 UTC ago 25, 2017 11:29:22 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Server number: 8.5.20.0 ago 25, 2017 11:29:22 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: OS Name: Windows 10 ago 25, 2017 11:29:22 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: OS Version: 10.0 ago 25, 2017 11:29:22 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Architecture: amd64 ago 25, 2017 11:29:22 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Java Home: C:\Program Files\Java\jre1.8.0_131 ago 25, 2017 11:29:22 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: JVM Version: 1.8.0_131-b11 ago 25, 2017 11:29:22 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: JVM Vendor: Oracle Corporation ago 25, 2017 11:29:22 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: CATALINA_BASE: C:\Netsoft\workspace_sts.metadata.plugins\org.eclipse.wst.server.core\tmp0 ago 25, 2017 11:29:22 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: CATALINA_HOME: C:\Program Files\Apache Software Foundation\Tomcat 8.5 ago 25, 2017 11:29:22 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:54095 ago 25, 2017 11:29:22 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Dcatalina.base=C:\Netsoft\workspace_sts.metadata.plugins\org.eclipse.wst.server.core\tmp0 ago 25, 2017 11:29:22 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 8.5 ago 25, 2017 11:29:22 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Dwtp.deploy=C:\Netsoft\workspace_sts.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps ago 25, 2017 11:29:22 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 8.5\endorsed ago 25, 2017 11:29:22 AM org.apache.catalina.startup.VersionLoggerListener log INFORMAÇÕES: Command line argument: -Dfile.encoding=Cp1252 ago 25, 2017 11:29:22 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent INFORMAÇÕES: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: [C:\Program Files\Java\jre1.8.0_131\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Program Files/Java/jre1.8.0_131/bin/server;C:/Program Files/Java/jre1.8.0_131/bin;C:/Program Files/Java/jre1.8.0_131/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Skype\Phone\;C:\Program Files\Java\jdk1.8.0_131\bin;C:\Program Files\Git\cmd;C:\Program Files\OpenVPN\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Netsoft\maven\apache-maven-3.5.0\bin;C:\Users\Guilherme Costa\AppData\Local\Microsoft\WindowsApps;;C:\Netsoft\sts-bundle\sts-3.8.4.RELEASE;;.] ago 25, 2017 11:29:22 AM org.apache.coyote.AbstractProtocol init INFORMAÇÕES: Initializing ProtocolHandler ["http-nio-8080"] ago 25, 2017 11:29:22 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector INFORMAÇÕES: Using a shared selector for servlet write/read ago 25, 2017 11:29:22 AM org.apache.coyote.AbstractProtocol init INFORMAÇÕES: Initializing ProtocolHandler ["ajp-nio-8009"] ago 25, 2017 11:29:22 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector INFORMAÇÕES: Using a shared selector for servlet write/read ago 25, 2017 11:29:22 AM org.apache.catalina.startup.Catalina load INFORMAÇÕES: Initialization processed in 914 ms ago 25, 2017 11:29:22 AM org.apache.catalina.core.StandardService startInternal INFORMAÇÕES: Starting service [Catalina] ago 25, 2017 11:29:22 AM org.apache.catalina.core.StandardEngine startInternal INFORMAÇÕES: Starting Servlet Engine: Apache Tomcat/8.5.20 ago 25, 2017 11:29:26 AM org.apache.jasper.servlet.TldScanner scanJars INFORMAÇÕES: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. ago 25, 2017 11:29:26 AM org.apache.catalina.core.ApplicationContext log INFORMAÇÕES: 3 Spring WebApplicationInitializers detected on classpath 11:29:26.872 [localhost-startStop-1] DEBUG br.com.netsoft.desif.ServletSpringMVC - No ContextLoaderListener registered, as createRootApplicationContext() did not return an application context

. _ /\ / ' () \ \ \ \ ( ( )__ | ' | '| | ' \/ ` | \ \ \ \ \/ __)| |)| | | | | || (_| | ) ) ) )

' |__| .|| ||| |__, | / / / /

||==============|__/=///_/ :: Spring Boot :: (v1.5.6.RELEASE)

2017-08-25 11:29:28.244 INFO 14224 --- [ost-startStop-1] br.com.netsoft.desif.ServletInitializer : Starting ServletInitializer v0.0.1-SNAPSHOT on DESKTOP-97UMVJU with PID 14224 (C:\Netsoft\workspace_sts.metadata.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\desif\WEB-INF\classes started by Guilherme Costa in C:\Netsoft\sts-bundle\sts-3.8.4.RELEASE) 2017-08-25 11:29:28.246 INFO 14224 --- [ost-startStop-1] br.com.netsoft.desif.ServletInitializer : No active profile set, falling back to default profiles: default 2017-08-25 11:29:28.743 INFO 14224 --- [ost-startStop-1] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@106ecf78: startup date [Fri Aug 25 11:29:28 BRT 2017]; root of context hierarchy 2017-08-25 11:29:31.923 INFO 14224 --- [ost-startStop-1] o.a.c.c.C.[.[localhost].[/desif] : Initializing Spring embedded WebApplicationContext 2017-08-25 11:29:31.924 INFO 14224 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 3181 ms 2017-08-25 11:29:33.281 INFO 14224 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'errorPageFilter' to: [/] 2017-08-25 11:29:33.281 INFO 14224 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Filter characterEncodingFilter was not registered (possibly already registered?) 2017-08-25 11:29:33.281 INFO 14224 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/] 2017-08-25 11:29:33.281 INFO 14224 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/] 2017-08-25 11:29:33.281 INFO 14224 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/] 2017-08-25 11:29:33.285 INFO 14224 --- [ost-startStop-1] .s.DelegatingFilterProxyRegistrationBean : Mapping filter: 'springSecurityFilterChain' to: [/] 2017-08-25 11:29:33.285 INFO 14224 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/] 2017-08-25 11:29:36.208 INFO 14224 --- [ost-startStop-1] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default' 2017-08-25 11:29:36.247 INFO 14224 --- [ost-startStop-1] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [ name: default ...] 2017-08-25 11:29:36.482 INFO 14224 --- [ost-startStop-1] org.hibernate.Version : HHH000412: Hibernate Core {5.0.12.Final} 2017-08-25 11:29:36.485 INFO 14224 --- [ost-startStop-1] org.hibernate.cfg.Environment : HHH000206: hibernate.properties not found 2017-08-25 11:29:36.489 INFO 14224 --- [ost-startStop-1] org.hibernate.cfg.Environment : HHH000021: Bytecode provider name : javassist 2017-08-25 11:29:36.643 INFO 14224 --- [ost-startStop-1] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.0.1.Final} 2017-08-25 11:29:37.020 INFO 14224 --- [ost-startStop-1] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect 2017-08-25 11:29:37.284 INFO 14224 --- [ost-startStop-1] o.h.e.j.e.i.LobCreatorBuilderImpl : HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException 2017-08-25 11:29:37.291 INFO 14224 --- [ost-startStop-1] org.hibernate.type.BasicTypeRegistry : HHH000270: Type registration [java.util.UUID] overrides previous : org.hibernate.type.UUIDBinaryType@264e00d2 2017-08-25 11:29:37.692 WARN 14224 --- [ost-startStop-1] org.hibernate.orm.deprecation : HHH90000014: Found use of deprecated [org.hibernate.id.SequenceHiLoGenerator] sequence-based id generator; use org.hibernate.id.enhanced.SequenceStyleGenerator instead. See Hibernate Domain Model Mapping Guide for details. 2017-08-25 11:29:38.509 INFO 14224 --- [ost-startStop-1] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2017-08-25 11:29:39.780 INFO 14224 --- [ost-startStop-1] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@106ecf78: startup date [Fri Aug 25 11:29:28 BRT 2017]; root of context hierarchy 2017-08-25 11:29:40.160 INFO 14224 --- [ost-startStop-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pais/listar],methods=[GET]}" onto public void br.com.netsoft.desif.controller.endereco.PaisController.index() 2017-08-25 11:29:40.163 INFO 14224 --- [ost-startStop-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pais/excluir],methods=[GET]}" onto public void br.com.netsoft.desif.controller.endereco.PaisController.excluir() 2017-08-25 11:29:40.164 INFO 14224 --- [ost-startStop-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pais/salvar],methods=[POST]}" onto public void br.com.netsoft.desif.controller.endereco.PaisController.salvar() 2017-08-25 11:29:40.164 INFO 14224 --- [ost-startStop-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pais/novo],methods=[GET]}" onto public void br.com.netsoft.desif.controller.endereco.PaisController.novo() 2017-08-25 11:29:40.164 INFO 14224 --- [ost-startStop-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pais/editar],methods=[GET]}" onto public void br.com.netsoft.desif.controller.endereco.PaisController.editar() 2017-08-25 11:29:40.165 INFO 14224 --- [ost-startStop-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/],methods=[GET]}" onto public java.lang.String br.com.netsoft.desif.controller.HomeController.index() 2017-08-25 11:29:40.166 INFO 14224 --- [ost-startStop-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/alterarSenha],methods=[GET]}" onto public void br.com.netsoft.desif.controller.HomeController.alterarSenha() 2017-08-25 11:29:40.170 INFO 14224 --- [ost-startStop-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest) 2017-08-25 11:29:40.171 INFO 14224 --- [ost-startStop-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse) 2017-08-25 11:29:40.266 INFO 14224 --- [ost-startStop-1] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2017-08-25 11:29:40.266 INFO 14224 --- [ost-startStop-1] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2017-08-25 11:29:40.404 INFO 14224 --- [ost-startStop-1] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/*/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2017-08-25 11:29:42.383 INFO 14224 --- [ost-startStop-1] b.a.s.AuthenticationManagerConfiguration :

Using default security password: 75e8f011-c741-46c1-a3ce-d4ff3e014af7

2017-08-25 11:29:42.551 INFO 14224 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: OrRequestMatcher [requestMatchers=[Ant [pattern='/css/'], Ant [pattern='/js/'], Ant [pattern='/images/'], Ant [pattern='/webjars/'], Ant [pattern='//favicon.ico'], Ant [pattern='/error']]], [] 2017-08-25 11:29:42.852 INFO 14224 --- [ost-startStop-1] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: OrRequestMatcher [requestMatchers=[Ant [pattern='/']]], [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@17faaf4, org.springframework.security.web.context.SecurityContextPersistenceFilter@76c16fea, org.springframework.security.web.header.HeaderWriterFilter@ab0ef43, org.springframework.security.web.authentication.logout.LogoutFilter@da4d2b8, org.springframework.security.web.authentication.www.BasicAuthenticationFilter@68f617a5, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@64c31570, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@40bb79d, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@6ee19992, org.springframework.security.web.session.SessionManagementFilter@6361d846, org.springframework.security.web.access.ExceptionTranslationFilter@2b66eb40, org.springframework.security.web.access.intercept.FilterSecurityInterceptor@2f4f5e44] 2017-08-25 11:29:43.434 INFO 14224 --- [ost-startStop-1] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup 2017-08-25 11:29:43.469 INFO 14224 --- [ost-startStop-1] br.com.netsoft.desif.ServletInitializer : Started ServletInitializer in 16.311 seconds (JVM running for 21.831) 2017-08-25 11:29:43.480 INFO 14224 --- [ost-startStop-1] o.a.c.c.C.[.[localhost].[/desif] : Initializing Spring FrameworkServlet 'dispatcher' 2017-08-25 11:29:43.480 INFO 14224 --- [ost-startStop-1] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcher': initialization started 2017-08-25 11:29:43.485 INFO 14224 --- [ost-startStop-1] .s.AnnotationConfigWebApplicationContext : Refreshing WebApplicationContext for namespace 'dispatcher-servlet': startup date [Fri Aug 25 11:29:43 BRT 2017]; parent: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@106ecf78 2017-08-25 11:29:43.494 INFO 14224 --- [ost-startStop-1] .s.AnnotationConfigWebApplicationContext : Registering annotated classes: [class br.com.netsoft.desif.AppWebConfiguration,class br.com.netsoft.desif.JPAConfiguration] 2017-08-25 11:29:43.589 INFO 14224 --- [ost-startStop-1] o.s.b.f.s.DefaultListableBeanFactory : Overriding bean definition for bean 'mvcConversionService' with a different definition: replacing [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration; factoryMethodName=mvcConversionService; initMethodName=null; destroyMethodName=(inferred); defined in org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration] with [Root bean: class [null]; scope=; abstract=false; lazyInit=false; autowireMode=3; dependencyCheck=0; autowireCandidate=true; primary=false; factoryBeanName=appWebConfiguration; factoryMethodName=mvcConversionService; initMethodName=null; destroyMethodName=(inferred); defined in br.com.netsoft.desif.AppWebConfiguration] 2017-08-25 11:29:43.802 INFO 14224 --- [ost-startStop-1] o.s.j.d.DriverManagerDataSource : Loaded JDBC driver: org.postgresql.Driver 2017-08-25 11:29:43.847 INFO 14224 --- [ost-startStop-1] j.LocalContainerEntityManagerFactoryBean : Building JPA container EntityManagerFactory for persistence unit 'default' 2017-08-25 11:29:43.847 INFO 14224 --- [ost-startStop-1] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [ name: default ...] 2017-08-25 11:29:43.914 INFO 14224 --- [ost-startStop-1] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.PostgreSQLDialect 2017-08-25 11:29:44.043 INFO 14224 --- [ost-startStop-1] o.h.e.j.e.i.LobCreatorBuilderImpl : HHH000424: Disabling contextual LOB creation as createClob() method threw error : java.lang.reflect.InvocationTargetException 2017-08-25 11:29:44.043 INFO 14224 --- [ost-startStop-1] org.hibernate.type.BasicTypeRegistry : HHH000270: Type registration [java.util.UUID] overrides previous : org.hibernate.type.UUIDBinaryType@264e00d2 2017-08-25 11:29:44.113 WARN 14224 --- [ost-startStop-1] o.h.b.i.SessionFactoryBuilderImpl : Unrecognized hbm2ddl_auto value : none. Supported values include create, create-drop, update, and validate. Ignoring 2017-08-25 11:29:44.156 WARN 14224 --- [ost-startStop-1] o.h.j.i.EntityManagerFactoryRegistry : HHH000436: Entity manager factory name (default) is already registered. If entity manager will be clustered or passivated, specify a unique value for property 'hibernate.ejb.entitymanager_factory_name' 2017-08-25 11:29:44.157 INFO 14224 --- [ost-startStop-1] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2017-08-25 11:29:44.298 INFO 14224 --- [ost-startStop-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pais/listar],methods=[GET]}" onto public void br.com.netsoft.desif.controller.endereco.PaisController.index() 2017-08-25 11:29:44.299 INFO 14224 --- [ost-startStop-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pais/excluir],methods=[GET]}" onto public void br.com.netsoft.desif.controller.endereco.PaisController.excluir() 2017-08-25 11:29:44.299 INFO 14224 --- [ost-startStop-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pais/salvar],methods=[POST]}" onto public void br.com.netsoft.desif.controller.endereco.PaisController.salvar() 2017-08-25 11:29:44.299 INFO 14224 --- [ost-startStop-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pais/novo],methods=[GET]}" onto public void br.com.netsoft.desif.controller.endereco.PaisController.novo() 2017-08-25 11:29:44.299 INFO 14224 --- [ost-startStop-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/pais/editar],methods=[GET]}" onto public void br.com.netsoft.desif.controller.endereco.PaisController.editar() 2017-08-25 11:29:44.301 INFO 14224 --- [ost-startStop-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/],methods=[GET]}" onto public java.lang.String br.com.netsoft.desif.controller.HomeController.index() 2017-08-25 11:29:44.301 INFO 14224 --- [ost-startStop-1] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/alterarSenha],methods=[GET]}" onto public void br.com.netsoft.desif.controller.HomeController.alterarSenha() 2017-08-25 11:29:44.378 INFO 14224 --- [ost-startStop-1] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2017-08-25 11:29:44.378 INFO 14224 --- [ost-startStop-1] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler] 2017-08-25 11:29:44.486 INFO 14224 --- [ost-startStop-1] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: WebApplicationContext for namespace 'dispatcher-servlet': startup date [Fri Aug 25 11:29:43 BRT 2017]; parent: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@106ecf78 2017-08-25 11:29:44.713 INFO 14224 --- [ost-startStop-1] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcher': initialization completed in 1233 ms 2017-08-25 11:29:44.740 INFO 14224 --- [ main] org.apache.coyote.ajp.AjpNioProtocol : Starting ProtocolHandler ["ajp-nio-8009"] 2017-08-25 11:29:44.746 INFO 14224 --- [ main] org.apache.catalina.startup.Catalina : Server startup in 21901 ms

Sobe seu projeto no github por favor, assim consigo testar tambem

Conseguiu baixar ?

Voce ta fazendo tanto a configuração manual, tanto a do springboot e tentando subir pelo tomcat certo?

Tenta fazer igual ao curso sem o spring boot, subindo pelo tomcat e tenta acessar seu controller

solução!

Retirei estes dois arquivos DesifApplication e ServletInitializer e entrou no Controller.

Agora apareceu o HTML.

Obrigado