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

Java compiler -parameters arg #613

Open
Swierkowski opened this issue Jan 23, 2025 · 2 comments
Open

Java compiler -parameters arg #613

Swierkowski opened this issue Jan 23, 2025 · 2 comments

Comments

@Swierkowski
Copy link

Spring framework uses the compile time information, provided by -parametesr compiler arg, for dependency injection.

In my project I have 2 DataSource beans and I want the one with name/alias "dataSouce" to be used by your DbSchedulerAutoConfiguration.

It should work when the -parameters compiler arg is used, now it does not.

As db-scheduler-boot-starter is actually a spring boot dedicated project, it should be built with that flag.

spring-boot-parent pom set this flag by default. It is also set when Gradle spring boot plugin is used.
Please read it for reference:
https://stackoverflow.com/questions/31845676/how-to-compile-spring-boot-applications-with-java-8-parameter-flag/49316086#49316086

I do not want to use spring Primary annotation, because the DataSource which should be used is actually not a primary DataSource in my project.

@kagkarlsson
Copy link
Owner

Yeah, sounds like something we should add 👍

@NicklasWallgren
Copy link
Contributor

In my project I have 2 DataSource beans and I want the one with name/alias "dataSouce" to be used by your DbSchedulerAutoConfiguration.

We need better control over the selection of datasource, see #626

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

No branches or pull requests

3 participants