You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@juneau.apache.org by ja...@apache.org on 2020/01/20 21:49:32 UTC
[juneau-petstore] 23/48: spring cache enabled
This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau-petstore.git
commit 6b7d62b10c2843a80866309d0f050de47acd5850
Author: rasa <fi...@gmail.com>
AuthorDate: Wed Oct 16 15:03:23 2019 +0300
spring cache enabled
---
juneau-petstore-server/pom.xml | 7 ++++++-
.../src/main/java/org/apache/juneau/petstore/App.java | 2 ++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/juneau-petstore-server/pom.xml b/juneau-petstore-server/pom.xml
index 3f80536..1b4cfa1 100644
--- a/juneau-petstore-server/pom.xml
+++ b/juneau-petstore-server/pom.xml
@@ -91,7 +91,12 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
-
+
+ <!-- Cache -->
+ <dependency>
+ <groupId>org.springframework.boot</groupId>
+ <artifactId>spring-boot-starter-cache</artifactId>
+ </dependency>
</dependencies>
<build>
diff --git a/juneau-petstore-server/src/main/java/org/apache/juneau/petstore/App.java b/juneau-petstore-server/src/main/java/org/apache/juneau/petstore/App.java
index b26eba7..5afbec2 100644
--- a/juneau-petstore-server/src/main/java/org/apache/juneau/petstore/App.java
+++ b/juneau-petstore-server/src/main/java/org/apache/juneau/petstore/App.java
@@ -15,6 +15,7 @@ package org.apache.juneau.petstore;
import org.apache.juneau.rest.springboot.JuneauRestInitializer;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
+import org.springframework.cache.annotation.EnableCaching;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
/**
@@ -22,6 +23,7 @@ import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
*/
@SpringBootApplication
@EnableJpaRepositories(basePackages = "org.apache.juneau.petstore")
+@EnableCaching
@SuppressWarnings("javadoc")
public class App {