Question from the Spring - Archive test

Is the following code valid? @Configuration public class MyConfiguration { @Bean public MyBean myBean() { return new MyBean(); } }