Documentation uses old java 8 style and for code samples and at same time uses Kotlin val style.

Here is an example Java (now) ApplicationContext context = new ClassPathXmlApplicationContext("services.xml", "daos.xml"); Kotlin(now) val context = ClassPathXmlApplicationContext("services.xml", "daos.xml")

Please, use Java 11 style so java section should be: var context = new ClassPathXmlApplicationContext("services.xml", "daos.xml");

Comment From: snicoll

Thanks for the suggestion but Spring Framework has support for Java 8 still and it would be misleading to have samples showcased in the doc that do not work with Java 8.