Hi,
First off, thank you for Activiti! It looks really great so far.
I'm trying to implement a custom RestVariableConverter in order to return my POJO variables as JSON in REST responses. My question is fairly similar to this one, but I didn't find a satisfactory answer there.
I don't want to clone the REST app. I was hoping I could provide a Spring @Configuration class with a RestResponseFactory @Bean and have Spring Boot pick it up automatically, but it doesn't.
How else can I provide a custom RestResponseFactory? By the way, I'm using 5.17.0.
Cheers,
Justin
First off, thank you for Activiti! It looks really great so far.
I'm trying to implement a custom RestVariableConverter in order to return my POJO variables as JSON in REST responses. My question is fairly similar to this one, but I didn't find a satisfactory answer there.
I don't want to clone the REST app. I was hoping I could provide a Spring @Configuration class with a RestResponseFactory @Bean and have Spring Boot pick it up automatically, but it doesn't.
How else can I provide a custom RestResponseFactory? By the way, I'm using 5.17.0.
Cheers,
Justin
Best regards,
You don't need to copy RestApiAutoConfiguration. Try this:
@Autowired
private RestResponseFactory restResponseFactory;
@PostConstruct
public void addCustomConverters() {
restResponseFactory.getVariableConverters().add(new YourCustomRestVariableConverter());
}