Я пытаюсь запустить мое весеннее приложение в Eclipse, но кажется, что запуск процесса запуска не заканчивается, когда я выбираю RightBtn -> Run as -> Spring boot App.На самом деле eclipse развертывает мое приложение, и я могу взаимодействовать с ним через REST (http://localhost.. .).Но когда я вижу консоль, я вижу, что она перестает печатать сообщения в консоли только тогда, когда она заканчивает читать основной метод.(Я помещаю журналы в раздел результатов)
Я пытаюсь выяснить, почему это происходит, потому что обычно, когда я запускаю приложение Spring, я получаю что-то вроде того, что я публикую в разделе вывода.:
Я не думаю, что это связано с объявлением bean-компонента, потому что я вижу следующее в журналах:
'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$7738e7d1] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
И, как я увидел в следующей ссылке ( Класс не подходит для обработки всеми BeanPostProcessors ) Я не должен беспокоиться об этом.Так что понятия не имею, в чем проблема.
Я пробовал много вещей, прокомментируйте некоторые из ярлыков, которые я включил, но все еще та же проблема.Я думаю, что я смешиваю слишком много меток, поэтому в какой-то момент мое приложение не может продолжить работу и не показывает никаких ошибок.
Я подумал, что был не прав, поэтому решил загрузить код из git (https://github.com/igorkosandyak/spring-boot-kafka), чтобы посмотреть, как должен выглядеть реальный вывод.
package com.lexcorp.appianSer;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Properties;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.http.HttpResponse;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.HttpClientBuilder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
import com.lexcorp.trazas.*;//traerte la clase de trazas
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.PropertySource;
import com.lexcorp.config.AppPropert;
import com.lexcorp.config.ConfProp;
import com.lexcorp.config.ServerProperties;
import com.lexcorp.filters.*;
import com.lexcorp.productor.ProducerConsumerApplication;
import org.apache.log4j.Logger;//ojo porque en el repo la clase de logger esta apuntada como com.springsource.org.apache.log4j
import org.springframework.context.annotation.ComponentScan;//tengo que decalara especificamente el bean invocado porque si no da error
import org.springframework.context.event.ContextRefreshedEvent;//importar p`ropiedad para evento
import org.springframework.context.event.EventListener;//importar las propiedades para escuchar eventos
import org.springframework.scheduling.annotation.Async;//tratamos de hacer que la llamada al metodo sea asincrona al código
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.boot.context.event.ApplicationReadyEvent;//importar eventos para ejecuccion tras el final del main
@PropertySource("classpath:application.yml")
@RestController
@SpringBootApplication
@EnableZuulProxy
@ComponentScan("com.lexcorp.config")
@EnableScheduling
public class ControllerFPC {
static Properties props;
static String servletContext;
static String propertiesName;
final static Logger logger = Logger.getLogger(ControllerFPC.class);
@Autowired
ServerProperties conf;
@Autowired
private ConfProp configurationData;
@Value("${name}")
private String name;/**/
@Value("${app.topic.fpc}")
private String topic;//esta es nueva para los valores mas complicados de recuperar que acumulan secciones y subsecciones
@Value("${spring.kafka.consumer.bootstrap-servers}")
private String bootstrapServers;//@Value("${spring.kafka.bootstrap-servers}")//configuracion antigua de como se leia el servidor para el consumidor
@Value("${spring.kafka.consumer.group-id}")
private String groupid;/*invocamos el grupo donde vamos a incluir al grupo consumidor */
//auto-offset-reset
@Value("${spring.kafka.consumer.auto-offset-reset}")
private String autooffsetr;/*invocamos el grupo donde vamos a incluir al auto-offset-reset consumidor para la politica de lectura de mensajes */
//key-deserializer
@Value("${spring.kafka.consumer.key-deserializer}")
private String keydeserial;/*invocamos el grupo donde vamos a incluir al deserializador de los mensajes consumidor */
//value-deserializer
@Value("${spring.kafka.consumer.value-deserializer}")
private String valuedeserial;/*invocamos el grupo donde vamos a incluir al deserializador de los mensajes consumidor */
@RequestMapping(value = "/available")
public String available() {
//startKafka();
System.out.println("EStoy disponible");
return "Spring in Action";// url http://localhost:8082/available
}
@RequestMapping(value = "/kafka")
public String startKafka() {
/*ProducerConsumerApplication pca= new ProducerConsumerApplication();
pca.consumerStart();*/
AppPropert prope= new AppPropert();
props=prope.arranqueProp();
ProducerConsumerApplication pca= new ProducerConsumerApplication();
//pca.execute(topico,"Enviamos mensajes desde findById");//no funciona este emtodo
pca.readTop(props, "Procedemos a activar la lectura");
return "Spring in Action";// url http://localhost:8082/available
}
@RequestMapping(value = "/deletecell")
public String postit() {// url http://localhost:8082/deletecell
HttpClient httpClient = HttpClientBuilder.create().build(); //Use this instead
try {//iniciamos la configuracion en el momento inicial del evento
ControllerFPC con= new ControllerFPC();
props=con.setProperties(props, conf);//rellenas el fichero de propiedades
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.out.println(e.getMessage());
logger.error("Exception : ControllerFPC.calculateLoadVal en la lectura del fichero de propiedades " + e.getMessage());
}
try {
HttpPost request = new HttpPost("http://localhost:8082/borrar");
StringEntity params =new StringEntity("appians={\"id\":392,\"idlo\":LoadRegister} ");//new StringEntity("details={\"id\":\"aa\",\"idlo\":\"aaa\"} ");
request.addHeader("content-type", "application/x-www-form-urlencoded");
request.setEntity(params);
HttpResponse response = httpClient.execute(request);
//handle response here...
}catch (Exception ex) {
//handle exception here
}
return "Spring in Action";// url http://localhost:8082/available
}
@RequestMapping(method = RequestMethod.POST, value = "/borrar")
@ResponseBody
public String findById(
@RequestParam String appians, HttpServletRequest req, HttpServletResponse res) {//@PathVariable long id
;
try {
String topico=topic;
ControllerFPC con= new ControllerFPC();
props=con.setProperties(props, conf);//rellenas el fichero de propiedades
props=con.setPropiedades(props, bootstrapServers, topic);// incluyes groupid, autooffsetr, keydeserial ,valuedeserial
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.out.println(e.getMessage());
logger.error("Exception : ControllerFPC.calculateLoadVal en la lectura del fichero de propiedades " + e.getMessage());
}
String answer = appians.substring(appians.indexOf(":")+1,appians.indexOf(","));
System.out.println(" has entrado en post recibir"+appians+ " extraccion --> "+answer);
ServletFPC srv = new ServletFPC();
String resultborrar=srv.borrarReg(answer,servletContext, propertiesName, logger, props);
return "exito"+resultborrar;
}
public static void main(String[] args) {
// TODO Auto-generated method stub
servletContext=System.getProperty("catalina.home");
propertiesName="config.properties";
if(servletContext==null) {
//la ruta antigua era en
//servletContext="aqui tenia la ruta absoluta";
}
servletContext=servletContext+"/instances/facturacioncorp001/webapps/";//La ruta linux es: "//instances//facturacioncorp001//webapps//properties//config.properties"
ControllerFPC con= new ControllerFPC();
props = new Properties();
SpringApplication.run(ControllerFPC.class, args);
logger.info("Starter of APP " );
System.out.println(" Finnish starting process ");
}
/*
@Async @EventListener(ContextRefreshedEvent.class)//ContextRefreshedEvent.class --> se lanza justo despuesd e que se creen todos los beans pero antes de que se inicie el servidor , ApplicationReadyEvent.class)
public void doSomethingAfterStartup() {
System.out.println("hello world, I have just started up");
}*/
/*@Scheduled(fixedDelay = 10000, initialDelay = 10)
public void execDel() {
System.out.println("Starting scheduled activity ");
AppPropert prope= new AppPropert();
props=prope.arranqueProp();
ProducerConsumerApplication pca= new ProducerConsumerApplication();
//pca.execute(topico,"Enviamos mensajes desde findById");//no funciona este emtodo
pca.readTop(props, "Procedemos a activar la lectura");
}*/
@Bean
public PreFilter preFilter() {
return new PreFilter();
}
@Bean
public PostFilter postFilter() {
return new PostFilter();
}
@Bean
public ErrorFilter errorFilter() {
return new ErrorFilter();
}
@Bean
public RouteFilter routeFilter() {
return new RouteFilter();
}/**/
@GetMapping("/datos")
public ConfProp retrieveDatosFromConfigurations() {
return configurationData;
}
public Properties setProperties(Properties props,ServerProperties conf) {
try {
props.setProperty("name", conf.getname());
props.setProperty("environment", conf.getenvironment());
props.setProperty("ORACLE_CHECK", conf.getORACLE_CHECK());
props.setProperty("UPLOAD_SFTP", conf.getUPLOAD_SFTP());
props.setProperty("SFTPUSER", conf.getSFTPUSER());
props.setProperty("SFTPPASS", conf.getSFTPPASS());
props.setProperty("TRAZA", conf.getTRAZA());
props.setProperty("WSDL", conf.getWSDL());
props.setProperty("REDIR", conf.getREDIR());
props.setProperty("FSDIR", conf.getFSDIR());
props.setProperty("DOWN_DIR", conf.getDOWN_DIR());
props.setProperty("SOAPACTION", conf.getSOAPACTION());
logger.info("Se ha completado la lectura del fichero de configuracion del config-server ControllerFPC.setProperties" );
}catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
//myLog.escribir(m1.toString()+"Exception: Error en metodo ServletFPC.crearConsulta no se ha enviado la request correctamente "+e.getMessage());
logger.error("Exception: ControllerFPC.setProperties ha fallado la lectura del ficehro de configruacion colgado en el config server " + e.getMessage());
}
return props;
}
public Properties setPropiedades(Properties props,String bootstrapServers, String topic) {
try {
props.setProperty("bootstrap-servers", bootstrapServers);
props.setProperty("topic", topic);
logger.info("Se ha completado la lectura del fichero de configuracion del config-server ControllerFPC.setProperties" );
}catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
//myLog.escribir(m1.toString()+"Exception: Error en metodo ServletFPC.crearConsulta no se ha enviado la request correctamente "+e.getMessage());
logger.error("Exception: ControllerFPC.setPropiedades ha fallado la lectura del fichero de configruacion colgado en el config server " + e.getMessage());
}
return props;
}
public Properties arranquePropiedad(String bootstrapServersP, String topicP) {
Properties props= new Properties();
bootstrapServersP=bootstrapServers;
topicP=topic;
try {
props.setProperty("bootstrap-servers", bootstrapServers);
props.setProperty("topic", topic);
logger.info("Se ha completado la lectura del fichero de configuracion del config-server ControllerFPC.setProperties" );
}catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
//myLog.escribir(m1.toString()+"Exception: Error en metodo ServletFPC.crearConsulta no se ha enviado la request correctamente "+e.getMessage());
logger.error("Exception: ControllerFPC.setPropiedades ha fallado la lectura del fichero de configruacion colgado en el config server " + e.getMessage());
}
return props;
}
public String callfindById(
String appians, Properties porpA) {//@PathVariable long id
;
String resultborrar="callfindById";
try {
String topico=topic;
ControllerFPC con= new ControllerFPC();
String answer = appians.substring(appians.indexOf(":")+1,appians.indexOf(","));
System.out.println(" has entrado en post recibir"+appians+ " extraccion --> "+answer);
ServletFPC srv = new ServletFPC();
resultborrar=srv.borrarReg(answer,servletContext, propertiesName, logger, porpA);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.out.println(e.getMessage());
logger.error("Exception : ControllerFPC.calculateLoadVal en la lectura del fichero de propiedades " + e.getMessage());
resultborrar="Exception : ControllerFPC.calculateLoadVal en la lectura del fichero de propiedades " + e.getMessage();
}
return "exito"+resultborrar;
}
}
ЧтоЯ фактически получаю в своем приложении: `
2019-03-29 10:54:16.506 INFO 26296 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@3688eb5b: startup date [Fri Mar 29 10:54:16 CET 2019]; root of context hierarchy
2019-03-29 10:54:16.696 INFO 26296 --- [ main] f.a.AutowiredAnnotationBeanPostProcessor : JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
2019-03-29 10:54:16.727 INFO 26296 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$7738e7d1] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.6.RELEASE)
2019-03-29 10:54:21 INFO ControllerFPC:516 - Starter of APP
Finnish starting process
Как вы можете видеть, мое приложение не идет дальше, и я беспокоюсь об этом.
То, что я ожидаю, это что-токак:
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.0.5.RELEASE)
2019-03-29 10:46:26.662 INFO 7124 --- [ main] com.demo.SpringBootWithKafkaApplication : Starting SpringBootWithKafkaApplication on ESX5CD8051MG5 with PID 7124 (C:\Users\llacadena\git\spring-boot-kafka\target\classes started by llacadena in C:\Users\llacadena\git\spring-boot-kafka)
2019-03-29 10:46:26.664 INFO 7124 --- [ main] com.demo.SpringBootWithKafkaApplication : No active profile set, falling back to default profiles: default
2019-03-29 10:46:26.692 INFO 7124 --- [ main] ConfigServletWebServerApplicationContext : Refreshing org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@3d680b5a: startup date [Fri Mar 29 10:46:26 CET 2019]; root of context hierarchy
2019-03-29 10:46:27.191 INFO 7124 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.kafka.annotation.KafkaBootstrapConfiguration' of type [org.springframework.kafka.annotation.KafkaBootstrapConfiguration$$EnhancerBySpringCGLIB$$b4a0ee3c] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2019-03-29 10:46:27.441 INFO 7124 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 9000 (http)
2019-03-29 10:46:27.453 INFO 7124 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2019-03-29 10:46:27.454 INFO 7124 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.34
2019-03-29 10:46:27.457 INFO 7124 --- [ost-startStop-1] o.a.catalina.core.AprLifecycleListener : 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\jdk1.8.0_161\bin;C:\windows\Sun\Java\bin;C:\windows\system32;C:\windows;C:\Program Files\Microsoft MPI\Bin\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0\;%JAVA_HOME\bin%;C:\opt\apache-maven-3.6.0\bin;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Webex\Webex\Applications;C:\Users\llacadena\AppData\Local\Microsoft\WindowsApps;C:\Users\llacadena\AppData\Local\atom\bin;C:\Users\llacadena\AppData\Local\Programs\Fiddler;C:\Users\llacadena\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\llacadena\AppData\Local\Programs\Git\cmd;C:\Program Files\Java\jre1.8.0_181\bin;C:\bin\zookeper\zookeeper-3.4.13\bin;;.]
2019-03-29 10:46:27.513 INFO 7124 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2019-03-29 10:46:27.513 INFO 7124 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 823 ms
2019-03-29 10:46:27.553 INFO 7124 --- [ost-startStop-1] o.s.b.w.servlet.ServletRegistrationBean : Servlet dispatcherServlet mapped to [/]
2019-03-29 10:46:27.555 INFO 7124 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2019-03-29 10:46:27.556 INFO 7124 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2019-03-29 10:46:27.556 INFO 7124 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2019-03-29 10:46:27.556 INFO 7124 --- [ost-startStop-1] o.s.b.w.servlet.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2019-03-29 10:46:27.668 INFO 7124 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-03-29 10:46:27.774 INFO 7124 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@3d680b5a: startup date [Fri Mar 29 10:46:26 CET 2019]; root of context hierarchy
2019-03-29 10:46:27.806 INFO 7124 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/kafka/publish],methods=[POST]}" onto public void com.demo.controllers.KafkaController.sendMessageToKafkaTopic(java.lang.String)
2019-03-29 10:46:27.808 INFO 7124 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2019-03-29 10:46:27.809 INFO 7124 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2019-03-29 10:46:27.824 INFO 7124 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-03-29 10:46:27.824 INFO 7124 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2019-03-29 10:46:27.955 INFO 7124 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2019-03-29 10:46:27.971 INFO 7124 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 2147483547
2019-03-29 10:46:27.982 INFO 7124 --- [ main] o.a.k.clients.consumer.ConsumerConfig : ConsumerConfig values:
auto.commit.interval.ms = 5000
2019-03-29 10:46:28.018 INFO 7124 --- [ main] o.a.kafka.common.utils.AppInfoParser : Kafka version : 1.0.2
2019-03-29 10:46:28.018 INFO 7124 --- [ main] o.a.kafka.common.utils.AppInfoParser : Kafka commitId : 2a121f7b1d402825
2019-03-29 10:46:28.021 INFO 7124 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService
2019-03-29 10:46:28.041 INFO 7124 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 9000 (http) with context path ''
2019-03-29 10:46:28.044 INFO 7124 --- [ main] com.demo.SpringBootWithKafkaApplication : Started SpringBootWithKafkaApplication in 1.621 seconds (JVM running for 2.053)
------ Обновление .-----
Я заметил, что это началось после того, как я настроил чтение приложенияФайл .yml с удаленного сервера конфигурации. Поэтому я посмотрел в своем файле bootstrap.properties, что происходит.
spring.application.name=kafkaclient
ribbon.eureka.enabled=false
this is the default
spring.cloud.config.profile=dev
spring.cloud.config.uri=http://config-service-remote.domain.corp
Если я прокомментирую строку, где находится сервер конфигурации (spring.cloud.config.uri)Объявлен и профиль (spring.cloud.config.profile) приложение продолжает развертывание.Но проблема в том, что мне нужно читать с этого config-сервера, так что есть идеи, почему это происходит?
---- обновление 2 -----
Как рекомендовал Дэдпул, я начал новый проект без Contrкласс ollerFPC и создал новый основной класс, который только запускает приложение.Я вдохновился этим источником (https://www.confluent.io/blog/apache-kafka-spring-boot-application), но все равно получаю ту же проблему. Когда я объявляю переменную начальной загрузки (spring.cloud.config.uri = http://config -service-remote.domain.corp ) мое приложение не завершает развертывание.
----- Решение ----
Верьте или нет, проблема не имеет ничего общего с сервером конфигурации иличто бы я ни говорил ранее. Моя проблема заключалась в моем application.yml, и ошибка была очень глупой, но также очень запутанной, потому что это не имеет смысла. Проблема в том, что если вы используете табулятор для сохранения структуры, вы в конечном итоге выведите файл из строя, так чтоничего не сработает, конечно, вы не поймете, и в конечном итоге вы будете разочарованы. Так что лучше, если в таблице использовать пробел, это звучит глупо, но сработало для меня. Хорошо, я покажу вам хороший пример того, что проблема была
spring:
kafka:
consumer:
group-id: foo <-- my problem was here because I tabulate this line.
auto-offset-reset: earliest
key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
producer:
key-serializer: org.apache.kafka.common.serialization.StringSerializer
value-serializer: org.apache.kafka.common.serialization.StringSerializer
app:
topic:
foo: foo.t
logging:
level:
root: WARN
org.springframework.web: INFO
com.memorynotfound: DEBUG
````````````````````````````````````