title: Cache annotation for a Mono return value no suitable serializer with Hazelcast
body: <p>Using spring-boot with spring-webflux and integrating with hazelcast 
  an error occurs when trying to use the cache based on annotations.</p>
  
  <p>I tried to use just spring-cache without hazelcast and works perfectly. but I should use hazelcast.</p>
  
  <p>Maven dependencies </p>
  
  <pre><code>  &lt;dependency&gt;
          &lt;groupId&gt;com.hazelcast&lt;/groupId&gt;
          &lt;artifactId&gt;hazelcast&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.hazelcast&lt;/groupId&gt;
          &lt;artifactId&gt;hazelcast-spring&lt;/artifactId&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>in a normal method when using the annotation Cachable</p>
  
  <pre><code>@Cacheable("ref-id")
  public Mono&lt;String&gt; testCache(String testValue) {
      try {
          TimeUnit.SECONDS.sleep(5);  // (1)
      } catch (InterruptedException e) {
          e.printStackTrace();
      }
          return Mono.just(testValue);
  }
  </code></pre>
  
  <p>this error is thrown</p>
  
  <pre><code>com.hazelcast.nio.serialization.HazelcastSerializationException: Failed to serialize 'reactor.core.publisher.MonoJust'
  at com.hazelcast.internal.serialization.impl.SerializationUtil.handleSerializeException(SerializationUtil.java:75)
  at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toBytes(AbstractSerializationService.java:157)
  at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toBytes(AbstractSerializationService.java:133)
  at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toData(AbstractSerializationService.java:118)
  at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toData(AbstractSerializationService.java:106) 
  .
  .
  Caused by: com.hazelcast.nio.serialization.HazelcastSerializationException: There is no suitable serializer for class reactor.core.publisher.MonoJust
  at com.hazelcast.internal.serialization.impl.AbstractSerializationService.serializerFor(AbstractSerializationService.java:487)
  at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toBytes(AbstractSerializationService.java:146)
  </code></pre>