2018-10-22         Norma

Error 404 while connecting to cordapp using rpc

I am trying to make a simple Cordapp and trying to connect to it using rpc via a Spring Boot application. Both Cordapp and Spring Boot applications are working fine without any errors but while making the request via postman it shows, error 404. I dont know what I am doing wrong. Can someone help me with this?My application.properties file for Spring Boot app:server.contextPath=/Chubb-Insuranceserver.port=7090node.PartyA.rpc.hostport=localhost:50004db.connection=jdbc:h2:tcp://localhost:2005/nodenodename=insurerlogging.level.org.springframework.web=DEBUGcron.expression=0 0 0...

 spring-boot                     1 answers                     12 view
 2018-10-22         Yvonne

Spring Boot - Load bean only if it is enabled by a property

I have a Spring Boot application with different submodules which also contains spring components.And in the main web modules I use 70% of the beans from the submodules. It depends on the application.yml properties, if the property group (which points to a bean) is enabled or not.First I wanted to create Aspect-s, so when a method of a bean (which is not enabled by it's property) is called, then throw an exception. This solution could work, but then I would need to create Aspect classes, method annotations, import more and more dependencies.So I am just wondering, would be t...

 spring-boot                     1 answers                     36 view
 2018-10-22         Ethel

Configuration changes in kafka appender for log4j2.xml?

I am using log4j2 kafka appender and log4j2.xml looks like <?xml version="1.0" encoding="UTF-8"?><Configuration status="info" name="spring-boot-log-to-kafka-example" packages="com.ms.lib.infrastructure.eurekaservice"> <Appenders> <Kafka name="kafkaAppender" topic="0v8uyhvb-logs"> <JSONLayout /> <Property name="bootstrap.servers">xyz.com:9094,xyz.com:9094,xyz.com:9094</Property> <Property name="security.protocol">SASL_SSL</Property> <Property name="sasl.mechanism"&g...

 spring-boot                     1 answers                     38 view
 2018-10-22         Barret

Spring Kafka - How to Retry with @KafkaListener

Question from Twitter:Just trying to find out a simple example with spring-kafka 2.1.7 that works with a KafkaListener and AckMode.MANUAL_IMMEDIATE , to retry last failed message.https://twitter.com/tolbier/status/1028936942447149056 it's generally better to ask such questions on Stack Overflow (tagged with spring-kafka.There are two ways:Add a RetryTemplate to the listener container factory - the retries will be performed in memory and you can set backoff properties.Add a SeekToCurrentErrorHandler which will re-seek the unprocessed records.Here is an example:@SpringBoot...

 spring-boot                     1 answers                     42 view
 2018-10-22         Veronica

Spring Kafka discard message by condition in listener

In my Spring Boot/Kafka project I have the following listener:@KafkaListener(topics = "${kafka.topic.update}", containerFactory = "updateKafkaListenerContainerFactory")public void onUpdateReceived(ConsumerRecord<String, Update> consumerRecord, Acknowledgment ack) { // do some logic ack.acknowledge();}Inside of the listener I need to check some condition according to my business logic and if it is not met - skip processing of this certain message and let Kafka know to redeliver this message one more time.The reason I need this - according to the business logic ...

 spring-boot                     2 answers                     45 view
 2018-10-22         Marina

Spring boot spring.kafka.bootstrap-servers not getting picked up by consumer config

I'm trying to use connect a spring boot project to kafka .In my application.properties file I have the following configs:spring.kafka.producer.key-serializer=org.apache.kafka.common.serialization.StringSerializerspring.kafka.producer.value-serializer=org.springframework.kafka.support.serializer.JsonSerializerspring.kafka.consumer.key-serializer=org.apache.kafka.common.serialization.StringSerializerspring.kafka.consumer.value-serializer=org.springframework.kafka.support.serializer.JsonSerializerspring.kafka.template.default-topic=my_default_topicspring.kafka.admin.fail-fast=...

 spring-boot                     1 answers                     46 view
 2018-10-22         Baldwin

@KafkaListener method not work with spring @Profile annotation

I have 2 @KafkaListener methods listening on the same tipic TopicA,but they are also annotated with different @Profile("dev") and @Profile("prod"),I set spring.profiles.active=dev ,and send messages to TopicA, both 2 methods can consume the message.is it a known bug for @KafkaListener with @Profile ? or there are something wrong with my config ? That's correct, because @KafkaListener doesn't present a bean. The @Profile can restrict only beans - factory methods in the @Configuration classes or scanned @Services: http://docs.spring.io/spring/docs/current/spring-framework...

 spring-boot                     1 answers                     49 view
 2018-10-22         Andrew

Registered RendezvousChannel bean cannot be found within Spring Application Context

In a Spring Boot application, we´re using a request-reply pattern by leveraging the RendezvousChannel from Spring Integration. When we receive a request, we create a uniquely named channel and register it within the Spring application context as follows:RendezvousChannel rendezvousChannel = MessageChannels.rendezvous(uniqueId).get();ConfigurableApplicationContext configurableApplicationContext = (ConfigurableApplicationContext) springContext;SingletonBeanRegistry beanRegistry = configurableApplicationContext.getBeanFactory();beanRegistry.registerSingleton(uniqueId, rendezvo...

 spring-boot                     1 answers                     88 view
 2018-10-22         Archer

Spring-boot error: Consider defining a bean named 'entityManagerFactory' in your configuration

I am running my Spring Boot application but it gives me this error related with the EntityManagerFactory. Should I create my own EntityManager? Isn't it included in spring-boot-starter-data-jpa2018-08-21 12:27:18.993 WARN 2728 --- [ main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'office365InstanceServiceImpl': Unsatisfied dependency expressed through field 'instanceRepository'; nested e...

 spring-boot                     1 answers                     59 view
 2018-10-22         Douglas

wso2 localhost certificate issue

I followed this blog:http://evanthika.blogspot.com/2014/01/how-to-solve-pkix-path-building-failed.htmlI am trying to call this:curl -k http://localhost:8080/menu -H "Authorization: Bearer 265b7375-5411-3a56-8d00-00b34d6313f1"from this example:https://medium.com/@balaajanthan/oauth2-login-for-spring-boot-application-with-wso2-identity-server-da0a88893987I followed the steps but still get this error:org.springframework.web.client.ResourceAccessException: I/O error on POST request for "https://localhost:9443/oauth2/introspect": sun.security.validator.ValidatorException: PKIX p...

 spring-boot                     1 answers                     68 view
 2018-10-22         Mortimer

Change feign client returned instance by using property file ( over-ride starter and eureka auto ribbon behavior)

IntroductionSo we have a starter that we are using as a parent, and this has various Templates and autoconfigurations that load feign clients as well.The feign clients are using eureka discovery underneath in order to iterate through the services. So here is an example of one of our feign clients:import org.springframework.cloud.openfeign.FeignClient;@FeignClient(name="decide-proxy")public interface DecideControllerApiClient extends DecideControllerApi {}In the projects that are using this spring boot ( and also cloud starter ) as a parent ( in our pom.xml), I would like to...

 spring-boot                     1 answers                     46 view
 2018-10-22         Egbert

spring boot admin showing only details tab

I am not getting any other tabs like Environment,Loggers.Threads,Traces etc.. Except Details tab in Spring Boot Admin page.I have created the following micro services.1)EurekaServer2)ZuulGateway3)Eurekaclient --2 instancesFor all microservies only details tab is showing.I am new to microservices.Any one please explain me and resolve my problem.Thank you.admin-client properties:#mongodbspring.data.mongodb.host=localhostspring.data.mongodb.port=27017spring.data.mongodb.database=Quickfix1#logginglogging.level.org.springframework.data=debuglogging.level.=erroreureka.client.enab...

 spring-boot                     2 answers                     49 view
 2018-10-22         Ives

Azure Active Directory with Springboot : how to handle expired oauth token?

I have a springboot app which use Microsoft Azure active directory to allow authentication (oauth2).I have followed the "how to" provided by Microsoft (https://docs.microsoft.com/en-us/java/azure/spring-framework/configure-spring-boot-starter-java-app-with-azure-active-directory?view=azure-java-stable).Everything is working well except that I have no ideas on how to handle expired token (after 1 hour) in a way that it will not affect the users.I know that it is possible to get new token with the refresh token but if I take a look in NimbusAuthorizationCodeTokenResponseClien...

 spring-boot                     1 answers                     49 view
 2018-10-22         Earl

azure active directory + spring boot

I am trying to run azure-active-directory-spring-boot-backend-sample but it is not working. After opening localhost:8080 it prompts with localhost:8080/login page and Azure link. After clicking on it it goes to Azure Active Directory page. After successful login it comes back to /login page rather than /welcome page. I tried using other example as well available on internet but nothing seems to be working. Please advise. You need to register your application under the Azure Active Directory where your users are stored. Then enter the published homepage URL in the Reply U...

 spring-boot                     1 answers                     50 view
 2018-10-22         Jim

WebClient How to flush part of received data?

I want to implement partial flushing of the received content. For example, I have the handler:return client .post() .body(BodyInserters.fromDataBuffers( request.body(BodyExtractors.toDataBuffers()))) .exchange() .....How to force flushing when some amount of databuffers is received? First, a word of warning about this:by default (i.e. if you don't flush manually), Netty will buffer bytes and flush them from time to time, whenever the channel is ready and the flushing strategy thinks it's convenient. This is optimized for performance.if you wish to flu...

 spring-boot                     1 answers                     62 view
 2018-10-22         Burnell

After logging in I am redirected to /robots.txt

So since a couple of weeks now we have noticed some strange behaviour on a couple of projects that use Spring Boot and Spring Security.Mostly only OSX users seem to have this issue but whenever we login to our application it randomly redirects back to robots.txtI realise that this is probably not enough info, but sadly it's all I got. We have seen this pop up only on OSX so far and on 3 different projects (some live and some running locally)server logs have this as request info (I removed/obfuscated some the real info):Request parameters:Request attributes:javax.servlet.for...

 spring-boot                     1 answers                     64 view

Page 1 of 129  |  Show More Pages:  Top Prev Next Last