Previously, when DevTools encountered a jar with a Class-Path manifest
attribute that referenced non-existent files, it would log one
message per entry in the attribute that did not exist. While useful
information, this has proven to be too verbose.
This commit aims to strike a better balances by logging a single
message for an entire jar. The message is a single line that
includes the path to the jar with the faulty Class-Path manifest
attribute and the paths of all of the files that do not exist that are
referenced by the attribute.
Closes gh-10111
Prior to this commit, custom `ProtocolResolvers` set on the
`ApplicationContext` were lost when Devtools is used as the customized
`ResourceLoader` did not copy any customization made to the default
resource loader.
This commit makes sure to copy any `ProtocolResolver` set on the context.
Closes gh-9331
HotSwapAgent is an open source competition to JRebel. This commit adds
"org.hotswap.agent.HotswapAgent" to the list of known Java agent based
class reloaders. This causes same behavior as when JRebel is used: a full
restart is NOT triggered when any class changes, however LiveReload event
is still triggered.
See gh-8683
Previously, reflection was used to set the OBJENESIS field of
DummyInvocationUtils with an Objenesis instance that does not use
caching. This has stopped working as the field is now declared final.
This commit updates the approach take by HateoasObjenesisCacheDisabler
to disable Objenesis's cache. Rather than changing the value of the
OBJENESIS field on DummyInvocationUtils, the cache field on the
ObjenesisStd instance is set to null instead. This has the desired
effect of disabling Objenesis's caching.
See gh-3784
Closes gh-8335
Add an annotation processor that generates properties files for certain
auto-configuration class annotations. Currently attribute values from
@AutoConfigureOrder, @AutoConfigureBefore, @AutoConfigureAfter and
@ConditionalOnClass annotations are stored.
The properties file will allow optimizations to be added in the
`spring-boot-autoconfigure` project. Primarily by removing the need
to ASM parse as many `.class` files.
See gh-7573
Previously, when DevTools' was used it would set the application
context's ResourceLoader and overwrite any custom ResourceLoader that
had been configured. On the rare occasion when the user had customized
the ResourceLoader this meant that the customization was lost and
certain resources would become unavailable.
This commit updates DevTools' ResourceLoader to delegate a custom
ResourceLoader if one has been configured. If one has not been
configured it delegates as before, i.e. to
WebApplicationContextResourceLoader for web applications and to
DefaultResourceLoader for all others apps.
Closes gh-8010
The intent of the test is to:
1. Make a change
2. Sleep for long enough for that change to be picked up
3. Make another change
4. Stop that watcher after 1 further scan has been performed
5. Assert that a further scan was performed by checking that two
separate sets of changes (step 1 and step 3) have been picked up
Previously, step 2 relied on simply sleeping for a period of time
longer than the polling interval. In reality, the polling interval
is only a minimum time between scans and the actual time between them
depends on thread scheduling, GC pauses, etc. This lead to the
test failing intermittently if the scan didn't happen in a timely
manner.
This commit removes the sleep and replaces it with a while loop that
waits for first change to be picked up. This ensures that the second
change will be detected separately from the first and that two
separate change sets should always be available once the watcher has
stopped.
See gh-7782
Update ClassLoaderFilesResourcePatternResolver to support servlet
resources when it's being used with a WebApplicationContext.
Prior to commit 918e122ddc a `ResourceLoader` was not added to the
`ApplicationContext`, meaning that servlet resources could be found by
virtue of the protected `getResourceByPath()` method. Following commit
918e122ddc, the context `ResourceLoader` is set, meaning that all calls
to `getResource` delegate to the `ResourceLoader` and the
`ApplicationContext` methods are not invoked. Since the devtools
`ResourceLoader` wasn't Servlet aware, servlet resources could not
be found.
Fixes gh-7752
Update LiveReloadServer so that different synchronization blocks are
used for the sockets and connection lists. Prior to this commit calling
`LiveReloadServer.stop()` would always result in a 60 second delay since
`stop()` owned the monitor add `removeConnection()` (called from a
different thread) needs it to remove the active connection.
Fixes gh-7749