Spring 3.2.x with Java 8

前端 未结 3 1819
长发绾君心
长发绾君心 2020-12-06 03:07

We are currently using spring 3.2.9. We are thinking of upgrading that to a newer version. When I checked the documentation it says that

Along with 4.

3条回答
  •  甜味超标
    2020-12-06 03:42

    As per my observations, you can actually use spring 3 with code compiled in Java 8, as long as you do not use new java8 syntax in there (like lambdas) in the paths scanned.

    So, you can use new APIs (streams ...), but not new syntax (lambdas...).

    When I tried, I ended up with startup errors like org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class

提交回复
热议问题