Skip to content

Commit 6d2fdd6

Browse files
committed
GH-173 - Polishing.
@ApplicationModuleTest is now explicitly declared to only be usable on types, documented and inherited.
1 parent 822febd commit 6d2fdd6

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

spring-modulith-test/src/main/java/org/springframework/modulith/test/ApplicationModuleTest.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@
1515
*/
1616
package org.springframework.modulith.test;
1717

18+
import java.lang.annotation.Documented;
19+
import java.lang.annotation.ElementType;
20+
import java.lang.annotation.Inherited;
1821
import java.lang.annotation.Retention;
1922
import java.lang.annotation.RetentionPolicy;
23+
import java.lang.annotation.Target;
2024

2125
import org.junit.jupiter.api.TestInstance;
2226
import org.junit.jupiter.api.TestInstance.Lifecycle;
@@ -35,14 +39,15 @@
3539
* Bootstraps the module containing the package of the test class annotated with {@link ApplicationModuleTest}. Will
3640
* apply the following modifications to the Spring Boot configuration:
3741
* <ul>
38-
* <li>Restricts the component scanning to the module's package.
39-
* <li>
40-
* <li>Sets the module's package as the only auto-configuration and entity scan package.
41-
* <li>
42+
* <li>Restricts the component scanning to the module's package.</li>
43+
* <li>Sets the module's package as the only auto-configuration and entity scan package.</li>
4244
* </ul>
4345
*
4446
* @author Oliver Drotbohm
4547
*/
48+
@Target(value = ElementType.TYPE)
49+
@Documented
50+
@Inherited
4651
@Retention(RetentionPolicy.RUNTIME)
4752
@BootstrapWith(SpringBootTestContextBootstrapper.class)
4853
@TypeExcludeFilters(ModuleTypeExcludeFilter.class)

0 commit comments

Comments
 (0)