If you are looking to develop a project with Spring, then chances are that you will be working with a specific version of Java to make everything work properly. So, it might be that the older versions of Java are not compatible with Spring, and you will need to update the Java version that you are using for everything to work properly.
However, if you are looking for compatibility between older versions of Java and Spring, then it is possible this can be done as long as both are compatible with each other. In some cases, older versions of Java might not be compatible with newer versions of Spring, so this would require some more adjustments and work on your part.