mtthwcmpbll / spring-boot-carbon-metrics

This repository is a project to automatically instrument a Spring Boot app with carbon-aware sustainability metrics.
Apache License 2.0
7 stars 4 forks source link

Spring boot 3 support #42

Closed mtthwcmpbll closed 1 year ago

mtthwcmpbll commented 1 year ago

Closes #40

I've got this working and it's a combination of:

file for registering auto-configurations, while maintaining backwards compatibility with registration in spring.factories

Unfortunately, this seems like it might be a losing battle based on this issue, which indicates it's not intended or supported to build a library that supports both. I'm hesitant to drop Spring Boot 2.x support because it'll cut out a lot of existing projects that I'd like to enable SCI measurements for (not just recently created or updated projects). We'll need to figure out a strategy for this in the future, but for now this refactor seems to work.