Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

Commit

Permalink
Fix caching hints
Browse files Browse the repository at this point in the history
More work is needed for proper caching support, see gh-465.

Closes gh-451
  • Loading branch information
sdeleuze committed Feb 4, 2021
1 parent 5836786 commit da12a9b
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,18 @@
package org.springframework.cache.annotation;

import org.springframework.context.annotation.AutoProxyRegistrar;
import org.springframework.nativex.extension.InitializationInfo;
import org.springframework.nativex.extension.InitializationTime;
import org.springframework.nativex.extension.NativeConfiguration;
import org.springframework.nativex.extension.NativeHint;
import org.springframework.nativex.extension.TypeInfo;
import org.springframework.nativex.type.AccessBits;

@NativeHint(trigger=CachingConfigurationSelector.class, typeInfos = {
@TypeInfo(types= {AutoProxyRegistrar.class,ProxyCachingConfiguration.class},typeNames= {
@NativeHint(trigger = CachingConfigurationSelector.class, typeInfos =
@TypeInfo(types = { AutoProxyRegistrar.class, ProxyCachingConfiguration.class }, typeNames= {
"org.springframework.cache.jcache.config.ProxyJCacheConfiguration",
"org.springframework.cache.aspectj.AspectJCachingConfiguration",
"org.springframework.cache.aspectj.AspectJJCacheConfiguration"

})})
}, access = AccessBits.CONFIGURATION))
@NativeHint(initializationInfos = @InitializationInfo(types = CachingConfigurationSelector.class, initTime = InitializationTime.BUILD))
public class CachingHints implements NativeConfiguration { }
1 change: 0 additions & 1 deletion spring-native-docs/src/main/asciidoc/support.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ The following starters are supported, the group ID is `org.springframework.boot`

* `spring-boot-starter-actuator`: WebMvc and WebFlux are supported, as well as metrics and tracing infrastructure. Beware that actuators significantly increase the footprint, this will be optimized in a future release.
** `--enable-https` flag is required for HTTPS support.
* `spring-boot-starter-cache`
* `spring-boot-starter-data-elasticsearch`
** `--enable-https` flag is required for HTTPS support.
* `spring-boot-starter-data-jdbc`
Expand Down
14 changes: 0 additions & 14 deletions spring-native-samples/petclinic-jpa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,6 @@
<groupId>org.springframework</groupId>
<artifactId>spring-context-indexer</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
Expand Down Expand Up @@ -112,16 +108,6 @@
<scope>test</scope>
</dependency>

<!-- caching -->
<dependency>
<groupId>javax.cache</groupId>
<artifactId>cache-api</artifactId>
</dependency>
<dependency>
<groupId>org.ehcache</groupId>
<artifactId>ehcache</artifactId>
</dependency>

<!-- webjars -->
<dependency>
<groupId>org.webjars</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.web.SpringDataWebAutoConfiguration;
import org.springframework.cache.annotation.EnableCaching;

/**
* PetClinic Spring Boot Application.
*
* @author Dave Syer
*
*/
@SpringBootApplication
public class PetClinicApplication {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import java.util.Collection;

import org.springframework.cache.annotation.Cacheable;
import org.springframework.dao.DataAccessException;
import org.springframework.data.repository.Repository;
import org.springframework.transaction.annotation.Transactional;
Expand All @@ -40,7 +39,6 @@ public interface VetRepository extends Repository<Vet, Integer> {
* @return a <code>Collection</code> of <code>Vet</code>s
*/
@Transactional(readOnly = true)
@Cacheable("vets")
Collection<Vet> findAll() throws DataAccessException;

}

0 comments on commit da12a9b

Please sign in to comment.