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

Erro ao rodar Configuracao.java

Olá,

Segui os passos do video, porém ao rodar as java aplication, recebo o seguinte erro:

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.5.2.RELEASE)

2017-04-03 13:06:16.193  INFO 12304 --- [           main] br.com.alura.listavip.Configuracao       : Starting Configuracao on NSPECO01Q4EZ with PID 12304 (C:\Users\A0050969\workspace-sts\listavip\target\classes started by A0050969 in C:\Users\A0050969\workspace-sts\listavip)
2017-04-03 13:06:16.200  INFO 12304 --- [           main] br.com.alura.listavip.Configuracao       : No active profile set, falling back to default profiles: default
2017-04-03 13:06:16.297  INFO 12304 --- [           main] ationConfigEmbeddedWebApplicationContext : Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@48a242ce: startup date [Mon Apr 03 13:06:16 BRT 2017]; root of context hierarchy
2017-04-03 13:06:16.629  WARN 12304 --- [           main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
2017-04-03 13:06:16.716 ERROR 12304 --- [           main] o.s.boot.SpringApplication               : Application startup failed

org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.

Estou esquecendo de algo?

Obrigado

3 respostas

Olá,

Consegui colocando esta anotação ;)

@EnableAutoConfiguration

No video esta informação não é informada. Talvez seja pela versão do Spring.

Abs

solução!

Fabricio boa tarde, usando a anotação

@SpringBootApplication

Você teoricamente resolveria esse problema, pois ela combina as anotações @Configuration, @EnableAutoConfiguration e @ComponentScan.

Olá Guilherme,

Funcionou, muito obrigado ;)