This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * from emp; -- show the whole table. | |
begin; | |
create table emp(empid int primary key, name text, department text, salary numeric); | |
insert into emp(empid, name, department, salary) values | |
(7,'Carol','Sales',4600.00), | |
(8,'sean','Sales',5600.00), | |
(1,'Cowen','Shipping',5400.00), | |
(2,'Tyler','Marketing',6300.00), | |
(5,'Charles','Sales',5400.00), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en" xmlns:th="http://www.thymeleaf.org"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Title</title> | |
</head> | |
<body> | |
<h1 style="text-align: center;" th:text="'List Of all Owner'">List of owner.</h1> | |
<table> | |
<thead> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package jian.he.bootstrap; | |
import jian.he.model.Owner; | |
import jian.he.model.Vet; | |
import jian.he.services.OwnerService; | |
import jian.he.services.VetService; | |
import jian.he.services.map.OwnerServiceMap; | |
import jian.he.services.map.VetServiceMap; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.CommandLineRunner; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package jian.he.controllers; | |
import jian.he.services.OwnerService; | |
import org.springframework.stereotype.Controller; | |
import org.springframework.ui.Model; | |
import org.springframework.web.bind.annotation.GetMapping; | |
@Controller | |
public class OwnerController { | |
private final OwnerService ownerService; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package jian.he.recipe.services; | |
import jian.he.recipe.domain.Recipe; | |
import jian.he.recipe.repositroies.RecipeRepository; | |
import org.junit.jupiter.api.BeforeEach; | |
import org.junit.jupiter.api.Test; | |
import org.mockito.Mock; | |
import org.mockito.MockitoAnnotations; | |
import java.util.HashSet; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package jian.he.services.springdatajpa; | |
import jian.he.model.Owner; | |
import jian.he.repositories.OwnerRepository; | |
import jian.he.repositories.PetRepository; | |
import jian.he.repositories.PetTypeRepository; | |
import jian.he.services.OwnerService; | |
import org.springframework.context.annotation.Profile; | |
import org.springframework.stereotype.Service; | |
import java.util.HashSet; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package jian.he.recipe.services; | |
import jian.he.recipe.commands.IngredientCommand; | |
import jian.he.recipe.converters.IngredientCommandToIngredient; | |
import jian.he.recipe.converters.IngredientToIngredientCommand; | |
import jian.he.recipe.domain.Ingredient; | |
import jian.he.recipe.domain.Recipe; | |
import jian.he.recipe.repositroies.RecipeRepository; | |
import jian.he.recipe.repositroies.UnitOfMeasureRepository; | |
import lombok.extern.slf4j.Slf4j; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package jian.he.formatters; | |
import jian.he.model.PetType; | |
import jian.he.services.PetTypeService; | |
import org.springframework.format.Formatter; | |
import org.springframework.stereotype.Component; | |
import java.text.ParseException; | |
import java.util.Collection; | |
import java.util.Locale; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package jian.he.bootstrap; | |
import jian.he.model.*; | |
import jian.he.services.*; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.CommandLineRunner; | |
import org.springframework.stereotype.Component; | |
import java.time.LocalDate; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://pgbackrest.org/user-guide.html#introduction | |
#in psql. | |
show wal_level \; show archive_mode \; show max_wal_senders; | |
ALTER SYSTEM SET wal_level = replica; | |
ALTER SYSTEM SET archive_mode = on; | |
ALTER SYSTEM SET max_wal_senders = 3; | |
ALTER SYSTEM SET archive_command = 'pgbackrest --stanza=pgsql15_3 archive-push %p'; | |
#check the cluster status. |
OlderNewer