ramkris

1

votes
0

answer
1.3k

views

2 Hikari CPs with different datasource configurations?

Has anyone successfully configured two hikari connection pools with different datasources in a spring boot application? How do I do it using application.properties?
ramkris
1

votes
1

answer
455

views

OAuth2RestTemplate “”Access token denied."

Trying to setup oauth2 authentication with 3rd party provider and it looks like for some reason it is not passing the client_id to the server. @Bean(name = 'oauth2RestTemplate') public OAuth2RestTemplate oauth2RestTemplate() { ArrayList
ramkris
1

votes
0

answer
30

views

Spring OAuth2 Rest exception swallows HttpResponse code

Restservice I am invoking using oauth2resttemplate returns a response with status code 403. I see that in my ClientHttpRequestInterceptor log lines injected to the resttemplate. This is the interceptor to intercept request and response. traceResponse() logs response status code as 403 which I expec...
ramkris
1

votes
1

answer
3k

views

Custom property editors in Spring 4

I am in the middle of migrating my project from Spring 2.5.6 to Spring 4.0.6. Here is the xml definitions for the customer property editors we have. yyyyMMdd yyyy-MM-dd yyyyMMdd yyyy-MM-dd However When I start my server, I am seeing the following exception in the log. Caused by: org.springframework....
ramkris
1

votes
1

answer
294

views

Storing Json response element in a variable using Karate

Storing the following json response in a variable [{'Resort':'SANRS','ResvNameID':14396162,'ConfirmationNo':'86749976'}, {'Resort':'SANRS','ResvNameID':13123123,'ConfirmationNo':'98932423'}] And def allres = response And print allres.reservations[0].ResvNameID does not print anything? What's wrong h...
ramkris
1

votes
1

answer
0

views

How to deserialize a java.nio.ByteBuffer in Java

I converted an object to json String and storing it as Blob in Datastax using ByteBuffer.wrap(attributes.getBytes()). How can I convert that back to String and assert in my tests? I tried using org.apache.commons.lang3.SerializationUtils.deserialize(entity.getAttributes().array()) but getting an ex...
ramkris
1

votes
1

answer
2k

views

HibernateTemplate in spring orm 4.0.6 is missing saveOrUpdateAll

I am trying to migrate our app from spring 2.5.6 to recent version of spring which is 4.0.6. One of the issues I faced is HibernateTemplate is missing saveOrUpdateAll. I could change it manually but I need to change it close 200 files. I don't know why Spring removed it instead of deprecating it....
ramkris
2

votes
1

answer
100

views

Understanding ES6 to ES5 code as transpiled by Babel

Babel transpiles the following ES6 code test(){ var list = [ 1, 2, 3 ] var [ a, , b ] = list [ b, a ] = [ a, b ] } into this function test() { var list = [1, 2, 3]; var _list = list[(b, a)] = [a, b]; var _list2 = _slicedToArray(_list, 3); var a = _list2[0]; var b = _list2[2]; } I can't understand wh...
RamKris
2

votes
1

answer
99

views

Reusing variable defined in one scenario in another

I assigned JSON response to a variable in the first scenario and I wanna use the same variable in other scenarios. Note that first scenario gets the response and assigns it to the variable defined in the background. Is it possible?
ramkris
2

votes
2

answer
6.4k

views

Cannot get Jedis connection; Could not get a resource from the pool

I am running a batch job for every 5 minutes and I don't wanna other nodes to run the same job hence I am using Jedis lock to lock an object for 5 minutes. So that other node won't get the lock if they try to run the same job. Job started after acquiring the lock and when I try to read it from Redis...
ramkris
2

votes
1

answer
566

views

socket.io with redis store

I am using socket.io with redis store. I have the following code taken as it is from socket.io website. var io = require('socket.io')(server); var redis = require('socket.io-redis'); io.adapter(redis({host: '128.199.122.183', port: 6379})); io.on('connection', function (socket) { socket.emit('news',...
RamKris
1

votes
1

answer
1.2k

views

Configuring Spring Data Redis with Lettuce for Redis master/slave

Using Lettuce, how do we configure Spring Data Redis running on host x at port 6379 and slave running on the same or different host but at port 6380?
ramkris
1

votes
1

answer
296

views

building dynamic urls in Karate and writing json output to a file

How to build dynamic urls in Karate feature file? I tried something like this and didn't work. Feature: PMS API Status Check Background: * url baseUrl * def spirit = 'SANRS' Scenario: Get guest details. Given path ''#(spirit)'/reservation/all' Url is not evaluating to SANRS and goes as spirit. Also...
ramkris