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

move org.eclipse.digitaltwin.basyx.core.LoggingPropertySourceLoader to new artifact basyx.springcore - would help to reduce dependencies to basyx.core #331

Open
in-fke opened this issue Jun 28, 2024 · 2 comments

Comments

@in-fke
Copy link
Contributor

in-fke commented Jun 28, 2024

I would like to remove the dependency to spring-context spring-boot-starter from basyx.core in order to de-couple dependencies better, especially for BaSyx Clients. This may only be the first step in a couple of steps to eventually decouple the clients from Spring.

The class org.eclipse.digitaltwin.basyx.core.LoggingPropertySourceLoader is the only class in basyx.core that depends on spring-boot.
It derives from org.springframework.boot.env.PropertiesPropertySourceLoader in order to log the location.

Then this derivative is used in these four projects:

  1. basyx.aasenvironment.component
  2. basyx.aasrepository.component
  3. basyx.conceptdescriptionrepository.component
  4. basyx.submodelrepository.component

in the file META-INF/spring.factories, stating
org.springframework.boot.env.PropertySourceLoader=org.eclipse.digitaltwin.basyx.spring.LoggingPropertySourceLoader

My suggestion:

  1. split "basyx.core" into "basyx.core" and "basyx.springcore" (the name is analog to "basyx.mongodbcore")
  2. Move the class org.eclipse.digitaltwin.basyx.core.LoggingPropertySourceLoader to org.eclipse.digitaltwin.basyx.springcore.LoggingPropertySourceLoader
  3. Have the above four projects depend on "basyx.springcore"
  4. Remove dependencies from "basyx.core" to "spring-context" and "spring-boot-starter"
  5. Step 4 has the side effect, that other projects would rely on these transitive dependencies, adjust accordingly.

I have already the changes in a fork - I could make a PR for this.

Regards,
Florian

@in-fke
Copy link
Contributor Author

in-fke commented Jun 28, 2024

this would be the diff (not sure if I should simply create the PR)
main...in-fke:basyx-java-server-sdk:main

@mdanish98
Copy link
Contributor

Hi @in-fke ,

Thanks for raising this issue.
We will discuss this internally on how to do this efficiently and how severe this is.
We will get back to you regarding this once we are done with the discussions.

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

No branches or pull requests

2 participants