我有一个module-info.java
看起来像的文件 -
module foo.microservice {
requires spring.core;
requires spring.beans;
requires spring.context;
requires java.sql; // required for Spring Annotation based configuration :(
opens foo.microservice.configuration to spring.core;
opens foo.microservice.internal.services to spring.beans;
opens foo.microservice.internal.controllers to spring.beans;
exports foo.microservice.configuration;
exports foo.microservice.controllers;
exports foo.microservice.models;
exports foo.microservice.services;
}
我希望有可能允许 Spring 访问所有内部包,而无需将每个包显式添加到 module-info.java 中。
有没有办法有一个更通用的opens
语句来允许我所有的内部包(和子包)都可以访问spring.beans
?