This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command
$ docker-compose up -d
# To Tear Down
$ docker-compose down --volumes
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
| package yourpackage.app; | |
| import com.cloudinary.Cloudinary; | |
| import com.cloudinary.SingletonManager; | |
| import com.cloudinary.utils.ObjectUtils; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| import org.springframework.scheduling.annotation.EnableScheduling; |
| package com.pig.jpa.hibernate.demo.repository; | |
| import java.util.List; | |
| import javax.persistence.EntityManager; | |
| import javax.persistence.Query; | |
| import javax.persistence.TypedQuery; | |
| import org.junit.Test; | |
| import org.junit.runner.RunWith; |
| public interface MemberRepository extends JpaRepository<SpringMember, Integer> { | |
| SpringMember findBySeqAndName(int seq, String name); | |
| List<SpringMember> findTop3ByNameLike(String name); | |
| SpringMember readBySeq(int seq); | |
| SpringMember readByName(String name); |
| package com.in28minutes.jpa.hibernate.demo.repository; | |
| import java.util.List; | |
| import javax.persistence.EntityManager; | |
| import javax.persistence.TypedQuery; | |
| import javax.persistence.criteria.CriteriaBuilder; | |
| import javax.persistence.criteria.CriteriaQuery; | |
| import javax.persistence.criteria.Join; | |
| import javax.persistence.criteria.JoinType; |
| package com.deb.qbe.model; | |
| @Entity | |
| @Table(name = "customers") | |
| @Data | |
| @NoArgsConstructor | |
| @AllArgsConstructor | |
| @EqualsAndHashCode | |
| @ToString | |
| @Builder | |
| public class Customers implements Serializable{ |
| package com.ypc.spring.data.elastic; | |
| import org.springframework.boot.SpringApplication; | |
| import org.springframework.boot.autoconfigure.SpringBootApplication; | |
| @SpringBootApplication | |
| public class ElasticApplication { | |
| public static void main(String[] args) { | |
| SpringApplication.run(ElasticApplication.class, args); |
| public interface BookQueryService { | |
| Page<Book> findBookNoCriteria(Integer page,Integer size); | |
| Page<Book> findBookCriteria(Integer page,Integer size,BookQuery bookQuery); | |
| } |
| @Entity | |
| public class Parent implements Serializable { | |
| @Id | |
| @GeneratedValue(strategy = GenerationType.AUTO) | |
| private Long id; | |
| @OneToMany(mappedBy = "parent", cascade = CascadeType.ALL, orphanRemoval = true) | |
| private Set<Child> children = new HashSet<>(); | |
| ... |