Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Boot 3 Support #77

Closed
LelvProgrammer opened this issue Jan 19, 2023 · 8 comments · Fixed by #78
Closed

Spring Boot 3 Support #77

LelvProgrammer opened this issue Jan 19, 2023 · 8 comments · Fixed by #78

Comments

@LelvProgrammer
Copy link

It seems like the library is no longer working out of the box with Spring Boot 3. I read other people were having issues, and I tried it myself and wouldn't get the logs running. It'd seem as though some adaptation has to be made, but if anyone got it working with Spring Boot 3, please share.

@igr
Copy link

igr commented Jan 19, 2023

Second that. There are no logs in SrpingBoot3 :(

@jewolz
Copy link

jewolz commented Jan 23, 2023

Same here. Is there a new version planned to support Spring Boot 3?

@gavlyukovskiy
Copy link
Owner

I suspect that the main change is coming from new autoconfiguration declaration mechanism introduced in 2.7. I don't think it's going to be a huge change and I'll try to look into it.

@ckdgus08
Copy link

ckdgus08 commented Jan 31, 2023

If you create a configuration file, you can see logs even if you use spring 3.0.

@Profile("local", "test")
@Configuration
@Import(DataSourceDecoratorAutoConfiguration::class)
class SqlLoggingConfiguration

This is my console log.
image

@LelvProgrammer @igr @jewolz

@jewolz
Copy link

jewolz commented Feb 2, 2023

I can confirm that with the additional DataSourceDecorator Config I also receive logs. However, funnily enough they are written to the spy.log file, even though I have decorator.datasource.p6spy.logging = SLF4j manually configured (actually it's the default value, but somehow not used)

@ckdgus08 Did you configure something specific there as well?

@sushovan86
Copy link

The first thing (probably the easiest) that needs to be done is to change the import packages from javax to jakarta. E.g. com.github.gavlyukovskiy.boot.jdbc.decorator.p6spy.P6SpyConfiguration the imports javax.annotation.PostConstruct and javax.annotation.PreDestroy needs to be changed to jakarta.annotation.PostConstruct and jakarta.annotation.PreDestroy respectively.

@gavlyukovskiy
Copy link
Owner

Fixed via #78, released in 1.9.0

@LelvProgrammer
Copy link
Author

Thanks mate - I'll tell stories about you to my grandchildren

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants