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

Add option to enforce explicit module dependency declarations #994

Open
odrotbohm opened this issue Dec 18, 2024 Discussed in #923 · 1 comment
Open

Add option to enforce explicit module dependency declarations #994

odrotbohm opened this issue Dec 18, 2024 Discussed in #923 · 1 comment
Labels
in: core Core module meta model type: enhancement Major enhanvements, new features

Comments

@odrotbohm
Copy link
Member

Discussed in #923

Originally posted by ghferrari November 4th, 2024
First of all, thanks to the Spring Modulith team for this great package. :-)

If I've understood the documentation for version 1.2.5, Spring Modulith currently uses an “allow-by-default” access model i.e. access to other modules is allowed unless explicitly restricted. Is there a way to switch to a "deny-by-default” permission model? In this scenario, access to other modules would be forbidden by default unless specifically granted? I think this would be a useful feature.

@odrotbohm odrotbohm added in: core Core module meta model type: enhancement Major enhanvements, new features labels Dec 18, 2024
@odrotbohm
Copy link
Member Author

This is currently not possible, but a very reasonable thing to ask for. As a workaround, you could use an ArchUnit rule that verifies @ApplicationModule being used and the allowedDependencies attribute set to a non-empty array.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Core module meta model type: enhancement Major enhanvements, new features
Projects
None yet
Development

No branches or pull requests

1 participant