Add application file and update entity in model

This commit is contained in:
saikat 2024-03-02 11:06:37 +05:30
parent f959e7a273
commit 605568587e
2 changed files with 18 additions and 0 deletions

View File

@ -5,14 +5,18 @@ import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import lombok.Setter; import lombok.Setter;
import javax.persistence.Entity;
import javax.persistence.Id;
import java.io.Serializable; import java.io.Serializable;
@Data @Data
@Entity
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
@Setter @Setter
public class Customer implements Serializable { public class Customer implements Serializable {
@Id
private String id; private String id;
private String name; private String name;

View File

@ -0,0 +1,14 @@
package com.baeldung.caching.twolevelcache;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
@SpringBootApplication
@EnableCaching
public class TwoLevelCacheApplication {
public static void main(String[] args) {
SpringApplication.run(TwoLevelCacheApplication.class, args);
}
}