As a follow-up of #20526 I feel that renaming the XML element from classes to application would be consistent. This section currently handles anything that's in BOOT-INF/classes but the content is not only classes.

This made the documentation in the XSD quite awkward.

This also impacts the Gradle DSL.

Comment From: wilkinsona

+1 for reworking the XML and Gradle DSL. I also think we should consider some changes to the class names rather than just changing their packages. I'm going to re-open #20526 so that we can handle all API changes in one place. We can then use this issue for Maven/Gradle configuration changes.

Comment From: wilkinsona

I'm wavering a bit on the application name now. Using it would result in configuration that might look like this:

<application>
    <layer-content layer="resources">
        <locations>
            <include>META-INF/resources/**</include>
            <include>resources/**</include>
            <include>static/**</include>
            <include>public/**</include>
        </locations>
    </layer-content>
    <layer-content layer="application">
        <locations>
            <include>**</include>
        </locations>
    </layer-content>
</application>

I find it a little confusing that the outer element is called application while there's also a layer called application. I think we could do with a different name for one of them but I'm struggling to think of one right now.

Comment From: mbhave

I had the same concern for renaming the tag name to application. However now that I think about it, I think application makes sense for the element name since everything under it is tied to application code. Although I can't think of another name for the application layer either.

Comment From: wilkinsona

We've decided to go with the classes -> application rename that's proposed here in the XML. We've also decided to combine the current resources and application layers into a single layer named application. That addresses the naming problem as the default application layer will then contain all of the application content. I've opened https://github.com/spring-projects/spring-boot/issues/20562 for that.