User attribute via HttpClient, needs userId in header

Cantor, Scott cantor.2 at osu.edu
Tue May 21 12:10:11 UTC 2024


> Is it possible to define a new bean and pass the userId in the 
> constructor with haederMapRef such as: myCustomBean("123XYZ")?

Is it possible to get Spring to create something on the fly that would be possible to parametrize at runtime? Almost certainly, but I don't know exactly how. Some mixture of a prototype bean and Spring expressions might manage it I guess.

In the longer term a RFE to simply make the header hook dynamic based on a Function is probably what's required.

-- Scott




More information about the users mailing list