spring-boot
kullanıyorum ve RestTemplate
'dan yararlanmak için maven pom içinde spring-web
bağımlılığı ekledim.İlkbahar-web için yay önyükleme otomatik yapılandırma nasıl engellenir?
Artık yay, EmbeddedServletContext
'u başlatmaya çalışır. Bunu nasıl önleyebilirim?
Exception in thread "main" 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.
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:133)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:474)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:686)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:957)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:946)
Caused by: org.springframework.context.ApplicationContextException: Unable to start EmbeddedWebApplicationContext due to missing EmbeddedServletContainerFactory bean.
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.getEmbeddedServletContainerFactory(EmbeddedWebApplicationContext.java:183)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.createEmbeddedServletContainer(EmbeddedWebApplicationContext.java:156)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.onRefresh(EmbeddedWebApplicationContext.java:130)
... 8 more
@EnableAutoConfiguration (exclude = exclude = WebMvcAutoConfiguration.class, EmbeddedServletContainerAutoConfiguration.class}) 'ı denedim ama yine de aynı hata ... 'Spring-web' için otomatik yapılandırmanın, değişiklik yapmak zorunda kalmadan ek açıklamalarla devre dışı bırakılması güzel olurdu. Benim ana başlangıç yöntemim ... – membersound
Öneriniz işe yarıyor olsa da, teşekkürler! Ama her nasılsa, sadece otomatik yapılandırma yapılandırma notunu devre dışı bırakmak güzel olurdu. – membersound
'spring.main.web_environment = false' daha iyidir ... Herhangi bir Java kodunu kodlamanıza gerek yok :-) –