Skip to content

Commit

Permalink
add code configuration docu
Browse files Browse the repository at this point in the history
  • Loading branch information
zdenek-jonas committed Oct 30, 2024
1 parent 278dd91 commit d00f8cf
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions docs/modules/misc/pages/integrations/spring-boot.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -288,3 +288,26 @@ and click connect.
If you are using Spring Dev Tools, it is recommended to exclude the {product-name} classes from the classpath. Spring Dev Tools use their own restart classloader, which dynamically reloads classes. This can cause issues with the {product-name} classes, as they are not designed to be reloaded on the fly.

Spring documentation: https://docs.spring.io/spring-boot/reference/using/devtools.html

== Code Configuration Before Storage Creation

There are some use cases where it is necessary to configure storage before it is created. For this purpose, you can use the `CustomStorageInitializer` to create a custom storage configuration in your application.

Example for configuring `LazyReferenceManager`:

[source,java]
----
@Component
public class CustomStorageInitializerImpl implements CustomStorageInitializer
{
@Override
public void initialize()
{
LazyReferenceManager.set(LazyReferenceManager.New(
Lazy.Checker(
1_000_000, // timeout of lazy access
0.75 // memory quota
)));
}
}
----

0 comments on commit d00f8cf

Please sign in to comment.