Skip to content

Allow @ContextConfiguration to be omitted [SPR-13955] #18528

Closed
@spring-projects-issues

Description

@spring-projects-issues

Phil Webb opened SPR-13955 and commented

The @ContextConfiguration annotation is often not really needed if working with a single config. For example:

@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration 
public class MyTest {

	@Test
	public void sometest() throws Exception {

	}

	@Configuration
	static class Config {

		@Bean
		public String myBean() {
			return "Hello";
		}

	}

}

Issue Links:

Referenced from: commits 2244461

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions