diff --git a/spring-framework-reference/src/beans.xml b/spring-framework-reference/src/beans.xml index 9c0c5c43ee3..c431a5ae381 100644 --- a/spring-framework-reference/src/beans.xml +++ b/spring-framework-reference/src/beans.xml @@ -4654,7 +4654,7 @@ dataSource.url=jdbc:mysql:mydb JSR 330's @Inject annotation can be used in place of Spring's @Autowired in the examples below. @Inject does not have a required - property unlike Spring's @Autowire + property unlike Spring's @Autowired annotation which has a required property to indicate if the value being injected is optional. This behavior is enabled automatically if you have the JSR 330 JAR on the @@ -6352,9 +6352,9 @@ jdbc.password= public static vo minimum. @Configuration @ImportResource("classpath:/com/acme/properties-config.xml") public class AppConfig { - private @Value("${jdbcProperties.url}") String url; - private @Value("${jdbcProperties.username}") String username; - private @Value("${jdbcProperties.password}") String password; + private @Value("${jdbc.url}") String url; + private @Value("${jdbc.username}") String username; + private @Value("${jdbc.password}") String password; public @Bean DataSource dataSource() { return new DriverManagerDataSource(url, username, password);