From d17c1741fe3edbc3ddafce1f1591a8926bcf5623 Mon Sep 17 00:00:00 2001 From: Jean Felipe Moschen Buss Date: Wed, 9 Apr 2025 20:08:24 -0300 Subject: [PATCH 01/29] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b2a43ef..d9e491d 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ Para configurar o ambiente de desenvolvimento, siga os passos abaixo: ## Implantação em Produção 🌐 Para implantar o projeto em produção, você pode simplesmente puxar a imagem Docker do GitHub Packages usando o seguinte comando: ``` -docker pull ghcr.io/orbitechz/npvet-backend:main +docker pull ghcr.io/orbitechz/npvet-backend-cloud:main ``` Depois de puxar a imagem, você pode executá-la em seu ambiente de produção usando o Docker ou a plataforma de orquestração de contêiner de sua escolha. From 49b7110b8feed9183e6f6e4fe05c621ef1b2d975 Mon Sep 17 00:00:00 2001 From: Vinicius Date: Thu, 10 Apr 2025 20:38:45 -0300 Subject: [PATCH 02/29] =?UTF-8?q?[DevOps]:=20Refatora=C3=A7=C3=A3o=20na=20?= =?UTF-8?q?pipeline=20do=20Projeto?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci-cd.yml | 119 +++++++++++++++++++++++++++++ .github/workflows/docker-build.yml | 42 ---------- 2 files changed, 119 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/ci-cd.yml delete mode 100644 .github/workflows/docker-build.yml diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml new file mode 100644 index 0000000..08111e4 --- /dev/null +++ b/.github/workflows/ci-cd.yml @@ -0,0 +1,119 @@ +name: CI Pipeline + +on: + push: + branches: + - main + - develop + pull_request: + branches: ["*"] + +jobs: + testes: + runs-on: ubuntu-latest + steps: + - name: Checkout de código + uses: actions/checkout@v3 + + - name: Configuração do JDK 17 + uses: actions/setup-java@v3 + with: + java-version: "17" + distribution: "temurin" + cache: maven + + - name: Permissão de Executável ao Maven + run: chmod +x ./mvnw + + - name: Executar Testes e Build + run: ./mvnw clean verify + + build-and-push-develop: + needs: testes + if: github.ref == 'refs/heads/develop' + runs-on: ubuntu-latest + steps: + - name: Checkout de código + uses: actions/checkout@v3 + + - name: Login no GCR + uses: docker/login-action@v2 + with: + registry: gcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build e Push da imagem Docker + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:develop + + deploy-develop: + needs: build-and-push-develop + if: github.ref == 'refs/heads/develop' + runs-on: ubuntu-latest + steps: + - name: Autenticar com Google Cloud + uses: google-github-actions/auth@v2 + with: + credentials_json: ${{ secrets.GCP_SA_KEY }} + + - name: Configurar o SDK do Google Cloud + uses: google-github-actions/setup-gcloud@v2 + with: + project_id: ${{ secrets.GCP_PROJECT_ID }} + install_components: "beta" + + - name: Deploy no Cloud Run + run: | + gcloud run deploy npvet-backend \ + --image gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:develop \ + --region us-central1 \ + --platform managed \ + + build-and-push-main: + needs: testes + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + steps: + - name: Checkout de código + uses: actions/checkout@v3 + + - name: Login no GCR + uses: docker/login-action@v2 + with: + registry: gcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build e Push da imagem Docker + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:latest + + deploy-main: + needs: build-and-push-main + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + steps: + - name: Autenticar com Google Cloud + uses: google-github-actions/auth@v2 + with: + credentials_json: ${{ secrets.GCP_SA_KEY }} + + - name: Configurar o SDK do Google Cloud + uses: google-github-actions/setup-gcloud@v2 + with: + project_id: ${{ secrets.GCP_PROJECT_ID }} + install_components: "beta" + + - name: Deploy no Cloud Run + run: | + gcloud run deploy npvet-backend \ + --image gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:latest \ + --region us-central1 \ + --platform managed \ diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml deleted file mode 100644 index 5c407b1..0000000 --- a/.github/workflows/docker-build.yml +++ /dev/null @@ -1,42 +0,0 @@ -name: Criar imagem Docker e publicar em Github Packages -on: - push: - branches: ['main'] - pull_request: - branches: ['main'] - -env: - REGISTRY: ghcr.io - IMAGE_NAME: ${{ github.repository }} - -jobs: - build-and-push-image: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Log in to the Container registry - uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - - - name: Build and push Docker image - uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 - with: - context: . - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} \ No newline at end of file From 4fb0e8796948bc03e26ccfb0f6af1838b30a4289 Mon Sep 17 00:00:00 2001 From: Vinicius Date: Thu, 10 Apr 2025 20:52:52 -0300 Subject: [PATCH 03/29] [DevOps]: Removendo o deploy na develop --- .github/workflows/ci-cd.yml | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 08111e4..fd77dba 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -50,29 +50,6 @@ jobs: push: true tags: gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:develop - deploy-develop: - needs: build-and-push-develop - if: github.ref == 'refs/heads/develop' - runs-on: ubuntu-latest - steps: - - name: Autenticar com Google Cloud - uses: google-github-actions/auth@v2 - with: - credentials_json: ${{ secrets.GCP_SA_KEY }} - - - name: Configurar o SDK do Google Cloud - uses: google-github-actions/setup-gcloud@v2 - with: - project_id: ${{ secrets.GCP_PROJECT_ID }} - install_components: "beta" - - - name: Deploy no Cloud Run - run: | - gcloud run deploy npvet-backend \ - --image gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:develop \ - --region us-central1 \ - --platform managed \ - build-and-push-main: needs: testes if: github.ref == 'refs/heads/main' From 2360860a0e49135ac74a2c87dbd2ac5b87c52ab2 Mon Sep 17 00:00:00 2001 From: Vinicius Date: Thu, 10 Apr 2025 21:02:29 -0300 Subject: [PATCH 04/29] [DevOps]fix: gcr.io para ghcr.io --- .github/workflows/ci-cd.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index fd77dba..64d1559 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -36,10 +36,10 @@ jobs: - name: Checkout de código uses: actions/checkout@v3 - - name: Login no GCR + - name: Login no ghcr uses: docker/login-action@v2 with: - registry: gcr.io + registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -48,7 +48,7 @@ jobs: with: context: . push: true - tags: gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:develop + tags: ghcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:develop build-and-push-main: needs: testes @@ -58,10 +58,10 @@ jobs: - name: Checkout de código uses: actions/checkout@v3 - - name: Login no GCR + - name: Login no ghcr uses: docker/login-action@v2 with: - registry: gcr.io + registry: ghcr.io username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} @@ -70,7 +70,7 @@ jobs: with: context: . push: true - tags: gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:latest + tags: ghcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:latest deploy-main: needs: build-and-push-main @@ -91,6 +91,6 @@ jobs: - name: Deploy no Cloud Run run: | gcloud run deploy npvet-backend \ - --image gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:latest \ + --image ghcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:latest \ --region us-central1 \ --platform managed \ From adad36a5369266f2f2a39d20aefd5b24eef94f88 Mon Sep 17 00:00:00 2001 From: Vinicius Date: Thu, 10 Apr 2025 21:09:17 -0300 Subject: [PATCH 05/29] [DevOps]fix: Corrigindo as tags --- .github/workflows/ci-cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 64d1559..1c29f25 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -48,7 +48,7 @@ jobs: with: context: . push: true - tags: ghcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:develop + tags: ghcr.io/${{ github.repository }}:latest build-and-push-main: needs: testes @@ -70,7 +70,7 @@ jobs: with: context: . push: true - tags: ghcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:latest + tags: ghcr.io/${{ github.repository }}:latest deploy-main: needs: build-and-push-main From 8de5c8d470081b01518b48abbd214a7ab9012f9c Mon Sep 17 00:00:00 2001 From: Vinicius Date: Thu, 10 Apr 2025 21:13:16 -0300 Subject: [PATCH 06/29] [DevOps]fix: Corrigindo as tags novamente --- .github/workflows/ci-cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 1c29f25..4cdbe20 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -48,7 +48,7 @@ jobs: with: context: . push: true - tags: ghcr.io/${{ github.repository }}:latest + tags: ghcr.io/orbitechz/npvet-backend-cloud:develop build-and-push-main: needs: testes @@ -70,7 +70,7 @@ jobs: with: context: . push: true - tags: ghcr.io/${{ github.repository }}:latest + tags: ghcr.io/orbitechz/npvet-backend-cloud:latest deploy-main: needs: build-and-push-main From d7f0601e6926eebca63d7bd9c0c2ab09a682080f Mon Sep 17 00:00:00 2001 From: Jean Moschen Date: Thu, 10 Apr 2025 23:09:38 -0300 Subject: [PATCH 07/29] add prefix --- .../com/orbitech/npvet/controller/AnamneseController.java | 2 +- .../java/com/orbitech/npvet/controller/AnimalController.java | 2 +- .../com/orbitech/npvet/controller/ConsultaController.java | 2 +- .../com/orbitech/npvet/controller/ExameFisicoController.java | 2 +- .../com/orbitech/npvet/controller/PerguntaController.java | 2 +- .../java/com/orbitech/npvet/controller/TutorController.java | 2 +- .../java/com/orbitech/npvet/controller/UsuarioController.java | 2 +- .../java/com/orbitech/npvet/controller/VacinaController.java | 2 +- .../com/orbitech/npvet/oauth/jwt/JwtAuthenticationFilter.java | 2 +- .../npvet/oauth/security/ApplicationSecurityConfig.java | 4 ++-- .../orbitech/npvet/oauth/web/AuthenticationController.java | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/orbitech/npvet/controller/AnamneseController.java b/src/main/java/com/orbitech/npvet/controller/AnamneseController.java index 4ebf807..a40528e 100644 --- a/src/main/java/com/orbitech/npvet/controller/AnamneseController.java +++ b/src/main/java/com/orbitech/npvet/controller/AnamneseController.java @@ -11,7 +11,7 @@ import java.util.List; @RestController -@RequestMapping("/anamnese") +@RequestMapping("/npvet-api/anamnese") @PreAuthorize("hasAuthority('ADMINISTRADOR')") public class AnamneseController { diff --git a/src/main/java/com/orbitech/npvet/controller/AnimalController.java b/src/main/java/com/orbitech/npvet/controller/AnimalController.java index 913acaf..e507289 100644 --- a/src/main/java/com/orbitech/npvet/controller/AnimalController.java +++ b/src/main/java/com/orbitech/npvet/controller/AnimalController.java @@ -11,7 +11,7 @@ import java.util.List; @RestController -@RequestMapping("/animal") +@RequestMapping("/npvet-api/animal") @PreAuthorize("hasAuthority('ADMINISTRADOR')") public class AnimalController { diff --git a/src/main/java/com/orbitech/npvet/controller/ConsultaController.java b/src/main/java/com/orbitech/npvet/controller/ConsultaController.java index 859657b..351130b 100644 --- a/src/main/java/com/orbitech/npvet/controller/ConsultaController.java +++ b/src/main/java/com/orbitech/npvet/controller/ConsultaController.java @@ -14,7 +14,7 @@ import java.util.List; @RestController -@RequestMapping("/consulta") +@RequestMapping("/npvet-api/consulta") @PreAuthorize("hasAuthority('ADMINISTRADOR')") public class ConsultaController { @Autowired diff --git a/src/main/java/com/orbitech/npvet/controller/ExameFisicoController.java b/src/main/java/com/orbitech/npvet/controller/ExameFisicoController.java index b7b1729..1a88e1e 100644 --- a/src/main/java/com/orbitech/npvet/controller/ExameFisicoController.java +++ b/src/main/java/com/orbitech/npvet/controller/ExameFisicoController.java @@ -11,7 +11,7 @@ import java.util.List; @RestController -@RequestMapping("/examefisico") +@RequestMapping("/npvet-api/examefisico") @PreAuthorize("hasAuthority('ADMINISTRADOR')") public class ExameFisicoController { diff --git a/src/main/java/com/orbitech/npvet/controller/PerguntaController.java b/src/main/java/com/orbitech/npvet/controller/PerguntaController.java index 193de72..875b4a0 100644 --- a/src/main/java/com/orbitech/npvet/controller/PerguntaController.java +++ b/src/main/java/com/orbitech/npvet/controller/PerguntaController.java @@ -12,7 +12,7 @@ import java.util.List; @RestController -@RequestMapping("/pergunta") +@RequestMapping("/npvet-api/pergunta") public class PerguntaController { @Autowired public PerguntaService perguntaService; diff --git a/src/main/java/com/orbitech/npvet/controller/TutorController.java b/src/main/java/com/orbitech/npvet/controller/TutorController.java index a1db5f0..56a44f0 100644 --- a/src/main/java/com/orbitech/npvet/controller/TutorController.java +++ b/src/main/java/com/orbitech/npvet/controller/TutorController.java @@ -11,7 +11,7 @@ import java.util.List; @RestController -@RequestMapping("/tutor") +@RequestMapping("/npvet-api/tutor") @PreAuthorize("hasAuthority('ADMINISTRADOR')") public class TutorController { @Autowired diff --git a/src/main/java/com/orbitech/npvet/controller/UsuarioController.java b/src/main/java/com/orbitech/npvet/controller/UsuarioController.java index f28dbdd..a26d717 100644 --- a/src/main/java/com/orbitech/npvet/controller/UsuarioController.java +++ b/src/main/java/com/orbitech/npvet/controller/UsuarioController.java @@ -11,7 +11,7 @@ import java.util.List; @RestController -@RequestMapping("/usuario") +@RequestMapping("/npvet-api/usuario") public class UsuarioController { @Autowired private UsuarioService service; diff --git a/src/main/java/com/orbitech/npvet/controller/VacinaController.java b/src/main/java/com/orbitech/npvet/controller/VacinaController.java index 23c6c6b..305bc62 100644 --- a/src/main/java/com/orbitech/npvet/controller/VacinaController.java +++ b/src/main/java/com/orbitech/npvet/controller/VacinaController.java @@ -12,7 +12,7 @@ import java.util.List; @RestController -@RequestMapping("/vacina") +@RequestMapping("/npvet-api/vacina") @PreAuthorize("hasAuthority('ADMINISTRADOR')") public class VacinaController { diff --git a/src/main/java/com/orbitech/npvet/oauth/jwt/JwtAuthenticationFilter.java b/src/main/java/com/orbitech/npvet/oauth/jwt/JwtAuthenticationFilter.java index 9a28a7a..10425f9 100644 --- a/src/main/java/com/orbitech/npvet/oauth/jwt/JwtAuthenticationFilter.java +++ b/src/main/java/com/orbitech/npvet/oauth/jwt/JwtAuthenticationFilter.java @@ -31,7 +31,7 @@ protected void doFilterInternal( @NonNull HttpServletResponse response, @NonNull FilterChain filterChain ) throws ServletException, IOException { - if (request.getServletPath().contains("/npvet/api/auth")) { + if (request.getServletPath().contains("/npvet-api/auth")) { filterChain.doFilter(request, response); return; } diff --git a/src/main/java/com/orbitech/npvet/oauth/security/ApplicationSecurityConfig.java b/src/main/java/com/orbitech/npvet/oauth/security/ApplicationSecurityConfig.java index e1283fc..c6f8bec 100644 --- a/src/main/java/com/orbitech/npvet/oauth/security/ApplicationSecurityConfig.java +++ b/src/main/java/com/orbitech/npvet/oauth/security/ApplicationSecurityConfig.java @@ -38,12 +38,12 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti http .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests((requests) -> requests - .requestMatchers("/auth/**").permitAll() + .requestMatchers("/npvet-api/auth/**").permitAll() .anyRequest().authenticated()) .authenticationProvider(authenticationProvider) .addFilterBefore(jwtAuthFilter, UsernamePasswordAuthenticationFilter.class) .logout(logout -> - logout.logoutUrl("/logout") + logout.logoutUrl("/npvet-api/logout") .addLogoutHandler(logoutHandler) .logoutSuccessHandler((request, response, authentication) -> SecurityContextHolder.clearContext()) ) diff --git a/src/main/java/com/orbitech/npvet/oauth/web/AuthenticationController.java b/src/main/java/com/orbitech/npvet/oauth/web/AuthenticationController.java index 2d780d0..29319cc 100644 --- a/src/main/java/com/orbitech/npvet/oauth/web/AuthenticationController.java +++ b/src/main/java/com/orbitech/npvet/oauth/web/AuthenticationController.java @@ -16,7 +16,7 @@ import java.io.IOException; @RestController -@RequestMapping("/auth") +@RequestMapping("/npvet-api/auth") @RequiredArgsConstructor public class AuthenticationController { From d1d7fcf72cf89aae0835752adbd930ba7717d51f Mon Sep 17 00:00:00 2001 From: Vinicius Date: Sun, 13 Apr 2025 17:28:50 -0300 Subject: [PATCH 08/29] [DevOps]: Criando os jobs para staging --- .github/workflows/ci-cd.yml | 50 +++++++++++++++++++++++++++++++++++-- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 4cdbe20..5caea52 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -5,6 +5,7 @@ on: branches: - main - develop + - staging pull_request: branches: ["*"] @@ -72,6 +73,28 @@ jobs: push: true tags: ghcr.io/orbitechz/npvet-backend-cloud:latest + build-and-push-staging: + needs: testes + if: github.ref == 'refs/heads/staging' + runs-on: ubuntu-latest + steps: + - name: Checkout de código + uses: actions/checkout@v3 + + - name: Login no ghcr + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Build e Push da imagem Docker + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: ghcr.io/orbitechz/npvet-backend-cloud:staging + deploy-main: needs: build-and-push-main if: github.ref == 'refs/heads/main' @@ -91,6 +114,29 @@ jobs: - name: Deploy no Cloud Run run: | gcloud run deploy npvet-backend \ - --image ghcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:latest \ + --image ghcr.io/orbitechz/npvet-backend-cloud:latest \ + --region us-central1 \ + --platform managed + + deploy-staging: + needs: build-and-push-staging + if: github.ref == 'refs/heads/staging' + runs-on: ubuntu-latest + steps: + - name: Autenticar com Google Cloud + uses: google-github-actions/auth@v2 + with: + credentials_json: ${{ secrets.GCP_SA_KEY }} + + - name: Configurar o SDK do Google Cloud + uses: google-github-actions/setup-gcloud@v2 + with: + project_id: ${{ secrets.GCP_PROJECT_ID }} + install_components: "beta" + + - name: Deploy no Cloud Run + run: | + gcloud run deploy npvet-backend \ + --image ghcr.io/orbitechz/npvet-backend-cloud:staging \ --region us-central1 \ - --platform managed \ + --platform managed From ec18d7119c310928bc0b5a89e6ef6dc1cbbc7f87 Mon Sep 17 00:00:00 2001 From: Vinicius Date: Sun, 13 Apr 2025 20:52:58 -0300 Subject: [PATCH 09/29] [DevOps]fix: Alterando para gcr.io novamente --- .github/workflows/ci-cd.yml | 58 ++++++++++++++++++++++++------------- 1 file changed, 38 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 5caea52..6f12ca3 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -37,19 +37,25 @@ jobs: - name: Checkout de código uses: actions/checkout@v3 - - name: Login no ghcr - uses: docker/login-action@v2 + - name: Autenticar com Google Cloud + uses: google-github-actions/auth@v2 + with: + credentials_json: ${{ secrets.GCP_SA_KEY }} + + - name: Configurar o SDK do Google Cloud + uses: google-github-actions/setup-gcloud@v2 with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + project_id: ${{ secrets.GCP_PROJECT_ID }} + + - name: Configurar Docker para usar credenciais do gcloud + run: gcloud auth configure-docker - name: Build e Push da imagem Docker uses: docker/build-push-action@v4 with: context: . push: true - tags: ghcr.io/orbitechz/npvet-backend-cloud:develop + tags: gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:develop build-and-push-main: needs: testes @@ -59,19 +65,25 @@ jobs: - name: Checkout de código uses: actions/checkout@v3 - - name: Login no ghcr - uses: docker/login-action@v2 + - name: Autenticar com Google Cloud + uses: google-github-actions/auth@v2 with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + credentials_json: ${{ secrets.GCP_SA_KEY }} + + - name: Configurar o SDK do Google Cloud + uses: google-github-actions/setup-gcloud@v2 + with: + project_id: ${{ secrets.GCP_PROJECT_ID }} + + - name: Configurar Docker para usar credenciais do gcloud + run: gcloud auth configure-docker - name: Build e Push da imagem Docker uses: docker/build-push-action@v4 with: context: . push: true - tags: ghcr.io/orbitechz/npvet-backend-cloud:latest + tags: gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:latest build-and-push-staging: needs: testes @@ -81,19 +93,25 @@ jobs: - name: Checkout de código uses: actions/checkout@v3 - - name: Login no ghcr - uses: docker/login-action@v2 + - name: Autenticar com Google Cloud + uses: google-github-actions/auth@v2 with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + credentials_json: ${{ secrets.GCP_SA_KEY }} + + - name: Configurar o SDK do Google Cloud + uses: google-github-actions/setup-gcloud@v2 + with: + project_id: ${{ secrets.GCP_PROJECT_ID }} + + - name: Configurar Docker para usar credenciais do gcloud + run: gcloud auth configure-docker - name: Build e Push da imagem Docker uses: docker/build-push-action@v4 with: context: . push: true - tags: ghcr.io/orbitechz/npvet-backend-cloud:staging + tags: gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:staging deploy-main: needs: build-and-push-main @@ -114,7 +132,7 @@ jobs: - name: Deploy no Cloud Run run: | gcloud run deploy npvet-backend \ - --image ghcr.io/orbitechz/npvet-backend-cloud:latest \ + --image gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:latest \ --region us-central1 \ --platform managed @@ -137,6 +155,6 @@ jobs: - name: Deploy no Cloud Run run: | gcloud run deploy npvet-backend \ - --image ghcr.io/orbitechz/npvet-backend-cloud:staging \ + --image gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:staging \ --region us-central1 \ --platform managed From 885bb90c23cb34f9e11d09bb7cab191d9c347eb9 Mon Sep 17 00:00:00 2001 From: Vinicius Date: Sun, 13 Apr 2025 21:07:04 -0300 Subject: [PATCH 10/29] =?UTF-8?q?[DevOps]fix:=20Removendo=20par=C3=A2metro?= =?UTF-8?q?s=20duplicados=20na=20application=20properties?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/application.properties | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 871df27..5c89a28 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -26,11 +26,6 @@ application.security.jwt.refresh-token.expiration=604800000 # ================== SERVIDOR ================== server.port=${API_PORT} -application.security.jwt.secret-key=404E635266556A586E3272357538782F413F4428472B4B6250645367566B5970 -application.security.jwt.expiration=86400000 -application.security.jwt.refresh-token.expiration=604800000 - - #================= LOGS =================== #logging.level.root = INFO From e5dee83dbc6ebec3934d0bf05b4b52ae3e6b3cbc Mon Sep 17 00:00:00 2001 From: Piegat Date: Tue, 15 Apr 2025 17:27:54 -0300 Subject: [PATCH 11/29] =?UTF-8?q?Resolvido=20bug=20ao=20cadastrar=20usu?= =?UTF-8?q?=C3=A1rio.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logs.log | 393 ++++++++++++++++++ .../npvet/controller/UsuarioController.java | 7 +- .../npvet/dto/UsuarioCadastrarDTO.java | 59 +++ .../com/orbitech/npvet/entity/Usuario.java | 2 +- .../npvet/service/UsuarioService.java | 20 +- 5 files changed, 470 insertions(+), 11 deletions(-) create mode 100644 logs.log create mode 100644 src/main/java/com/orbitech/npvet/dto/UsuarioCadastrarDTO.java diff --git a/logs.log b/logs.log new file mode 100644 index 0000000..1ed4625 --- /dev/null +++ b/logs.log @@ -0,0 +1,393 @@ +2025-04-15T17:25:02.847-03:00 INFO 7044 --- [main] com.orbitech.npvet.NpvetApplication : Starting NpvetApplication using Java 23.0.2 with PID 7044 (C:\Users\gusta\OneDrive\Documentos\projects\NPVet-Backend-Cloud\target\classes started by gusta in C:\Users\gusta\OneDrive\Documentos\projects\NPVet-Backend-Cloud) +2025-04-15T17:25:02.850-03:00 INFO 7044 --- [main] com.orbitech.npvet.NpvetApplication : No active profile set, falling back to 1 default profile: "default" +2025-04-15T17:25:04.513-03:00 INFO 7044 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2025-04-15T17:25:04.613-03:00 INFO 7044 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 89 ms. Found 11 JPA repository interfaces. +2025-04-15T17:25:05.322-03:00 INFO 7044 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) +2025-04-15T17:25:05.333-03:00 INFO 7044 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +2025-04-15T17:25:05.333-03:00 INFO 7044 --- [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.12] +2025-04-15T17:25:05.427-03:00 INFO 7044 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext +2025-04-15T17:25:05.428-03:00 INFO 7044 --- [main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2514 ms +2025-04-15T17:25:05.595-03:00 INFO 7044 --- [main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] +2025-04-15T17:25:05.669-03:00 INFO 7044 --- [main] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.2.7.Final +2025-04-15T17:25:05.672-03:00 INFO 7044 --- [main] org.hibernate.cfg.Environment : HHH000406: Using bytecode reflection optimizer +2025-04-15T17:25:05.864-03:00 INFO 7044 --- [main] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy +2025-04-15T17:25:06.045-03:00 INFO 7044 --- [main] o.s.o.j.p.SpringPersistenceUnitInfo : No LoadTimeWeaver setup: ignoring JPA class transformer +2025-04-15T17:25:06.067-03:00 INFO 7044 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... +2025-04-15T17:25:06.424-03:00 INFO 7044 --- [main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@49190ed6 +2025-04-15T17:25:06.427-03:00 INFO 7044 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. +2025-04-15T17:25:06.944-03:00 INFO 7044 --- [main] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy +2025-04-15T17:25:08.009-03:00 INFO 7044 --- [main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] +2025-04-15T17:25:08.083-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:25:08.084-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkryqhlmk35ogpp3jxx4rh68yk6 em tabela anamneses_anamnese_perguntas +2025-04-15T17:25:08.088-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:25:08.088-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkj180gtcsb792u2fk8bv1ritss em tabela anamneses_historico_progresso_medico +2025-04-15T17:25:08.095-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:25:08.095-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata outros 2 objetos +2025-04-15T17:25:08.103-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:25:08.104-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkooe7ghmjfibiiiaeumgu4lrr9 em tabela usuario_consultas +2025-04-15T17:25:08.109-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:25:08.109-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkp9adf0r99ppueo26leonkk3dj em tabela tutor_contato +2025-04-15T17:25:08.113-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:25:08.114-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkntx5ttgu7xkuccjc0upkfxvbg em tabela tutor_endereco +2025-04-15T17:25:08.127-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:25:08.127-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata outros 2 objetos +2025-04-15T17:25:08.136-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:25:08.136-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata outros 2 objetos +2025-04-15T17:25:08.142-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:25:08.142-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkryqhlmk35ogpp3jxx4rh68yk6" da relação "anamneses_anamnese_perguntas" não existe, ignorando +2025-04-15T17:25:08.144-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:25:08.144-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkn181obfnf7s68nnoj6r159a67" da relação "anamneses_anamnese_perguntas" não existe, ignorando +2025-04-15T17:25:08.145-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:25:08.145-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkj180gtcsb792u2fk8bv1ritss" da relação "anamneses_historico_progresso_medico" não existe, ignorando +2025-04-15T17:25:08.146-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:25:08.146-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fk2wdtp4d1fp3plwa1irevgxxth" da relação "anamneses_historico_progresso_medico" não existe, ignorando +2025-04-15T17:25:08.147-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:25:08.147-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fk5kj7c5g7y3kfcrm7bx8e30qod" da relação "token" não existe, ignorando +2025-04-15T17:25:08.148-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:25:08.148-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkp9adf0r99ppueo26leonkk3dj" da relação "tutor_contato" não existe, ignorando +2025-04-15T17:25:08.149-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:25:08.149-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkpkk8cikgtskg8dasw3tshtg02" da relação "tutor_contato" não existe, ignorando +2025-04-15T17:25:08.149-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:25:08.149-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkntx5ttgu7xkuccjc0upkfxvbg" da relação "tutor_endereco" não existe, ignorando +2025-04-15T17:25:08.150-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:25:08.150-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkpuwl7gfirj9402n0g37q50v98" da relação "tutor_endereco" não existe, ignorando +2025-04-15T17:25:08.151-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:25:08.151-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkooe7ghmjfibiiiaeumgu4lrr9" da relação "usuario_consultas" não existe, ignorando +2025-04-15T17:25:08.152-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:25:08.152-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkbfa7h15o0v6bdi8cfhediah0i" da relação "usuario_consultas" não existe, ignorando +2025-04-15T17:25:08.455-03:00 INFO 7044 --- [main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' +2025-04-15T17:25:08.819-03:00 INFO 7044 --- [main] o.s.d.j.r.query.QueryEnhancerFactory : Hibernate is in classpath; If applicable, HQL parser will be used. +2025-04-15T17:25:09.897-03:00 WARN 7044 --- [main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning +2025-04-15T17:25:10.156-03:00 INFO 7044 --- [main] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@4ca87dbe, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@2eeee108, org.springframework.security.web.context.SecurityContextHolderFilter@632f505b, org.springframework.security.web.header.HeaderWriterFilter@2c969f, org.springframework.security.web.authentication.logout.LogoutFilter@54214c34, com.orbitech.npvet.oauth.jwt.JwtAuthenticationFilter@61d1315b, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@19b656b0, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@1c6d908b, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@7c1aed5a, org.springframework.security.web.access.ExceptionTranslationFilter@10f535a6, org.springframework.security.web.access.intercept.AuthorizationFilter@32c3102] +2025-04-15T17:25:10.418-03:00 INFO 7044 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path '' +2025-04-15T17:25:10.424-03:00 INFO 7044 --- [main] com.orbitech.npvet.NpvetApplication : Started NpvetApplication in 8.074 seconds (process running for 10.241) +2025-04-15T17:25:23.644-03:00 INFO 7044 --- [http-nio-8080-exec-2] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet' +2025-04-15T17:25:23.644-03:00 INFO 7044 --- [http-nio-8080-exec-2] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet' +2025-04-15T17:25:23.646-03:00 INFO 7044 --- [http-nio-8080-exec-2] o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms +2025-04-15T17:25:52.545-03:00 WARN 7044 --- [http-nio-8080-exec-7] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 0, SQLState: 22001 +2025-04-15T17:25:52.545-03:00 ERROR 7044 --- [http-nio-8080-exec-7] o.h.engine.jdbc.spi.SqlExceptionHelper : ERRO: valor é muito longo para tipo character varying(11) +2025-04-15T17:25:52.555-03:00 ERROR 7044 --- [http-nio-8080-exec-7] c.o.npvet.config.GlobalErrorHandler : OCORREU UM ERRO Exception: could not execute statement [ERRO: valor é muito longo para tipo character varying(11)] [insert into public.usuario (cpf,created_at,deleted_at,nome,password,role,updated_at,username) values (?,?,?,?,?,?,?,?)]; SQL [insert into public.usuario (cpf,created_at,deleted_at,nome,password,role,updated_at,username) values (?,?,?,?,?,?,?,?)] +2025-04-15T17:26:04.422-03:00 INFO 7044 --- [http-nio-8080-exec-10] c.orbitech.npvet.service.UsuarioService : USUÁRIO:teteNOME:teteUSERNAME:teteCPF:16076125004| Criado por:test2e 1 +2025-04-15T17:26:26.396-03:00 INFO 7044 --- [SpringApplicationShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' +2025-04-15T17:26:26.418-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:26.418-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkryqhlmk35ogpp3jxx4rh68yk6 em tabela anamneses_anamnese_perguntas +2025-04-15T17:26:26.422-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:26.423-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkj180gtcsb792u2fk8bv1ritss em tabela anamneses_historico_progresso_medico +2025-04-15T17:26:26.430-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:26.430-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata outros 2 objetos +2025-04-15T17:26:26.440-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:26.442-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkooe7ghmjfibiiiaeumgu4lrr9 em tabela usuario_consultas +2025-04-15T17:26:26.446-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:26.446-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkp9adf0r99ppueo26leonkk3dj em tabela tutor_contato +2025-04-15T17:26:26.452-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:26.452-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkntx5ttgu7xkuccjc0upkfxvbg em tabela tutor_endereco +2025-04-15T17:26:26.476-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:26.476-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata outros 2 objetos +2025-04-15T17:26:26.486-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:26.487-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata outros 2 objetos +2025-04-15T17:26:26.492-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:26.492-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkryqhlmk35ogpp3jxx4rh68yk6" da relação "anamneses_anamnese_perguntas" não existe, ignorando +2025-04-15T17:26:26.494-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:26.494-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkn181obfnf7s68nnoj6r159a67" da relação "anamneses_anamnese_perguntas" não existe, ignorando +2025-04-15T17:26:26.495-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:26.496-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkj180gtcsb792u2fk8bv1ritss" da relação "anamneses_historico_progresso_medico" não existe, ignorando +2025-04-15T17:26:26.497-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:26.497-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fk2wdtp4d1fp3plwa1irevgxxth" da relação "anamneses_historico_progresso_medico" não existe, ignorando +2025-04-15T17:26:26.498-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:26.499-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fk5kj7c5g7y3kfcrm7bx8e30qod" da relação "token" não existe, ignorando +2025-04-15T17:26:26.500-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:26.500-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkp9adf0r99ppueo26leonkk3dj" da relação "tutor_contato" não existe, ignorando +2025-04-15T17:26:26.501-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:26.501-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkpkk8cikgtskg8dasw3tshtg02" da relação "tutor_contato" não existe, ignorando +2025-04-15T17:26:26.503-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:26.503-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkntx5ttgu7xkuccjc0upkfxvbg" da relação "tutor_endereco" não existe, ignorando +2025-04-15T17:26:26.504-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:26.505-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkpuwl7gfirj9402n0g37q50v98" da relação "tutor_endereco" não existe, ignorando +2025-04-15T17:26:26.506-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:26.506-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkooe7ghmjfibiiiaeumgu4lrr9" da relação "usuario_consultas" não existe, ignorando +2025-04-15T17:26:26.508-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:26.508-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkbfa7h15o0v6bdi8cfhediah0i" da relação "usuario_consultas" não existe, ignorando +2025-04-15T17:26:26.530-03:00 INFO 7044 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... +2025-04-15T17:26:26.532-03:00 INFO 7044 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. +2025-04-15T17:26:38.647-03:00 INFO 14724 --- [main] com.orbitech.npvet.NpvetApplication : Starting NpvetApplication using Java 23.0.2 with PID 14724 (C:\Users\gusta\OneDrive\Documentos\projects\NPVet-Backend-Cloud\target\classes started by gusta in C:\Users\gusta\OneDrive\Documentos\projects\NPVet-Backend-Cloud) +2025-04-15T17:26:38.649-03:00 INFO 14724 --- [main] com.orbitech.npvet.NpvetApplication : No active profile set, falling back to 1 default profile: "default" +2025-04-15T17:26:39.587-03:00 INFO 14724 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2025-04-15T17:26:39.672-03:00 INFO 14724 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 78 ms. Found 11 JPA repository interfaces. +2025-04-15T17:26:40.263-03:00 INFO 14724 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) +2025-04-15T17:26:40.271-03:00 INFO 14724 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] +2025-04-15T17:26:40.271-03:00 INFO 14724 --- [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.12] +2025-04-15T17:26:40.354-03:00 INFO 14724 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext +2025-04-15T17:26:40.355-03:00 INFO 14724 --- [main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1642 ms +2025-04-15T17:26:40.475-03:00 INFO 14724 --- [main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] +2025-04-15T17:26:40.531-03:00 INFO 14724 --- [main] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.2.7.Final +2025-04-15T17:26:40.534-03:00 INFO 14724 --- [main] org.hibernate.cfg.Environment : HHH000406: Using bytecode reflection optimizer +2025-04-15T17:26:40.649-03:00 INFO 14724 --- [main] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy +2025-04-15T17:26:40.781-03:00 INFO 14724 --- [main] o.s.o.j.p.SpringPersistenceUnitInfo : No LoadTimeWeaver setup: ignoring JPA class transformer +2025-04-15T17:26:40.796-03:00 INFO 14724 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... +2025-04-15T17:26:40.968-03:00 INFO 14724 --- [main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@3303e89e +2025-04-15T17:26:40.970-03:00 INFO 14724 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. +2025-04-15T17:26:41.367-03:00 INFO 14724 --- [main] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy +2025-04-15T17:26:42.271-03:00 INFO 14724 --- [main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] +2025-04-15T17:26:42.287-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.287-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "anamneses" não existe, ignorando +2025-04-15T17:26:42.288-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.288-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "anamneses" não existe, ignorando +2025-04-15T17:26:42.289-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.289-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "anamneses" não existe, ignorando +2025-04-15T17:26:42.290-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.290-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "animal" não existe, ignorando +2025-04-15T17:26:42.290-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.290-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "consulta" não existe, ignorando +2025-04-15T17:26:42.291-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.291-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "consulta" não existe, ignorando +2025-04-15T17:26:42.292-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.292-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "consulta" não existe, ignorando +2025-04-15T17:26:42.294-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.294-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "consulta" não existe, ignorando +2025-04-15T17:26:42.294-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.295-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "exame_fisico" não existe, ignorando +2025-04-15T17:26:42.296-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.296-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "exame_fisico" não existe, ignorando +2025-04-15T17:26:42.297-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.297-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "vacina" não existe, ignorando +2025-04-15T17:26:42.298-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.299-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "anamnese-pergunta" não existe, ignorando +2025-04-15T17:26:42.300-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.300-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "anamnese_historico" não existe, ignorando +2025-04-15T17:26:42.301-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.301-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "anamneses" não existe, ignorando +2025-04-15T17:26:42.302-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.302-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "animal" não existe, ignorando +2025-04-15T17:26:42.302-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.302-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "consulta" não existe, ignorando +2025-04-15T17:26:42.303-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.303-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "contato" não existe, ignorando +2025-04-15T17:26:42.303-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.303-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "endereco" não existe, ignorando +2025-04-15T17:26:42.304-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.304-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "exame_fisico" não existe, ignorando +2025-04-15T17:26:42.304-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.304-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "perguntas" não existe, ignorando +2025-04-15T17:26:42.304-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.305-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "tutor" não existe, ignorando +2025-04-15T17:26:42.305-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.305-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "usuario" não existe, ignorando +2025-04-15T17:26:42.306-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.306-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "vacina" não existe, ignorando +2025-04-15T17:26:42.307-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.307-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "anamneses_anamnese_perguntas" não existe, ignorando +2025-04-15T17:26:42.307-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.307-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "anamneses_anamnese_perguntas" não existe, ignorando +2025-04-15T17:26:42.308-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.308-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "anamneses_historico_progresso_medico" não existe, ignorando +2025-04-15T17:26:42.309-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.309-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "anamneses_historico_progresso_medico" não existe, ignorando +2025-04-15T17:26:42.309-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.309-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "token" não existe, ignorando +2025-04-15T17:26:42.310-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.310-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "tutor_contato" não existe, ignorando +2025-04-15T17:26:42.311-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.311-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "tutor_contato" não existe, ignorando +2025-04-15T17:26:42.311-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.311-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "tutor_endereco" não existe, ignorando +2025-04-15T17:26:42.312-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.312-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "tutor_endereco" não existe, ignorando +2025-04-15T17:26:42.312-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.312-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "usuario_consultas" não existe, ignorando +2025-04-15T17:26:42.313-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.314-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "usuario_consultas" não existe, ignorando +2025-04-15T17:26:42.314-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.314-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "anamneses_anamnese_perguntas" não existe, ignorando +2025-04-15T17:26:42.315-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.316-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "anamneses_historico_progresso_medico" não existe, ignorando +2025-04-15T17:26:42.317-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.317-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "token" não existe, ignorando +2025-04-15T17:26:42.318-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.318-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "tutor_contato" não existe, ignorando +2025-04-15T17:26:42.318-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.319-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "tutor_endereco" não existe, ignorando +2025-04-15T17:26:42.319-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.319-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "usuario_consultas" não existe, ignorando +2025-04-15T17:26:42.320-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:26:42.321-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : sequência "token_seq" não existe, ignorando +2025-04-15T17:26:42.535-03:00 INFO 14724 --- [main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' +2025-04-15T17:26:42.862-03:00 INFO 14724 --- [main] o.s.d.j.r.query.QueryEnhancerFactory : Hibernate is in classpath; If applicable, HQL parser will be used. +2025-04-15T17:26:43.929-03:00 WARN 14724 --- [main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning +2025-04-15T17:26:44.210-03:00 INFO 14724 --- [main] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@7e78953e, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@78e8594a, org.springframework.security.web.context.SecurityContextHolderFilter@2fc2305a, org.springframework.security.web.header.HeaderWriterFilter@5d40034e, org.springframework.security.web.authentication.logout.LogoutFilter@7aab77f, com.orbitech.npvet.oauth.jwt.JwtAuthenticationFilter@60a3a0fa, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@5e5e680b, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@45cee4d2, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@51b274ce, org.springframework.security.web.access.ExceptionTranslationFilter@b359d2d, org.springframework.security.web.access.intercept.AuthorizationFilter@4b39b5fe] +2025-04-15T17:26:44.488-03:00 INFO 14724 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path '' +2025-04-15T17:26:44.496-03:00 INFO 14724 --- [main] com.orbitech.npvet.NpvetApplication : Started NpvetApplication in 6.268 seconds (process running for 7.829) +2025-04-15T17:26:48.477-03:00 INFO 14724 --- [http-nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet' +2025-04-15T17:26:48.478-03:00 INFO 14724 --- [http-nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet' +2025-04-15T17:26:48.480-03:00 INFO 14724 --- [http-nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 2 ms +2025-04-15T17:26:48.765-03:00 ERROR 14724 --- [http-nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception + +org.springframework.security.core.userdetails.UsernameNotFoundException: User not found + at com.orbitech.npvet.oauth.security.ApplicationConfig.lambda$userDetailsService$0(ApplicationConfig.java:25) ~[classes/:na] + at java.base/java.util.Optional.orElseThrow(Optional.java:403) ~[na:na] + at com.orbitech.npvet.oauth.security.ApplicationConfig.lambda$userDetailsService$1(ApplicationConfig.java:25) ~[classes/:na] + at com.orbitech.npvet.oauth.jwt.JwtAuthenticationFilter.doFilterInternal(JwtAuthenticationFilter.java:48) ~[classes/:na] + at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] + at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] + at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:82) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:69) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] + at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] + at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:233) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:191) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:352) ~[spring-web-6.0.11.jar:6.0.11] + at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:268) ~[spring-web-6.0.11.jar:6.0.11] + at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91) ~[spring-web-6.0.11.jar:6.0.11] + at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] + at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-6.0.11.jar:6.0.11] + at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] + at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-6.0.11.jar:6.0.11] + at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] + at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-6.0.11.jar:6.0.11] + at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] + at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:166) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:738) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:894) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1740) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at java.base/java.lang.Thread.run(Thread.java:1575) ~[na:na] + +2025-04-15T17:27:02.338-03:00 ERROR 14724 --- [http-nio-8080-exec-5] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception + +org.springframework.security.core.userdetails.UsernameNotFoundException: User not found + at com.orbitech.npvet.oauth.security.ApplicationConfig.lambda$userDetailsService$0(ApplicationConfig.java:25) ~[classes/:na] + at java.base/java.util.Optional.orElseThrow(Optional.java:403) ~[na:na] + at com.orbitech.npvet.oauth.security.ApplicationConfig.lambda$userDetailsService$1(ApplicationConfig.java:25) ~[classes/:na] + at com.orbitech.npvet.oauth.jwt.JwtAuthenticationFilter.doFilterInternal(JwtAuthenticationFilter.java:48) ~[classes/:na] + at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] + at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] + at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:82) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:69) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] + at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] + at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:233) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:191) ~[spring-security-web-6.1.3.jar:6.1.3] + at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:352) ~[spring-web-6.0.11.jar:6.0.11] + at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:268) ~[spring-web-6.0.11.jar:6.0.11] + at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91) ~[spring-web-6.0.11.jar:6.0.11] + at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] + at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-6.0.11.jar:6.0.11] + at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] + at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-6.0.11.jar:6.0.11] + at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] + at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-6.0.11.jar:6.0.11] + at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] + at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:166) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:738) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:894) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1740) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-10.1.12.jar:10.1.12] + at java.base/java.lang.Thread.run(Thread.java:1575) ~[na:na] + +2025-04-15T17:27:28.871-03:00 INFO 14724 --- [http-nio-8080-exec-9] c.orbitech.npvet.service.UsuarioService : USUÁRIO:teteNOME:teteUSERNAME:teteCPF:160.761.250-04| Criado por:test2e 1 +2025-04-15T17:27:32.570-03:00 INFO 14724 --- [SpringApplicationShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' +2025-04-15T17:27:32.598-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:27:32.598-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkryqhlmk35ogpp3jxx4rh68yk6 em tabela anamneses_anamnese_perguntas +2025-04-15T17:27:32.602-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:27:32.602-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkj180gtcsb792u2fk8bv1ritss em tabela anamneses_historico_progresso_medico +2025-04-15T17:27:32.608-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:27:32.608-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata outros 2 objetos +2025-04-15T17:27:32.618-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:27:32.618-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkooe7ghmjfibiiiaeumgu4lrr9 em tabela usuario_consultas +2025-04-15T17:27:32.622-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:27:32.622-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkp9adf0r99ppueo26leonkk3dj em tabela tutor_contato +2025-04-15T17:27:32.628-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:27:32.628-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkntx5ttgu7xkuccjc0upkfxvbg em tabela tutor_endereco +2025-04-15T17:27:32.646-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:27:32.646-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata outros 2 objetos +2025-04-15T17:27:32.657-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:27:32.658-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata outros 2 objetos +2025-04-15T17:27:32.664-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:27:32.664-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkryqhlmk35ogpp3jxx4rh68yk6" da relação "anamneses_anamnese_perguntas" não existe, ignorando +2025-04-15T17:27:32.665-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:27:32.665-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkn181obfnf7s68nnoj6r159a67" da relação "anamneses_anamnese_perguntas" não existe, ignorando +2025-04-15T17:27:32.666-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:27:32.666-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkj180gtcsb792u2fk8bv1ritss" da relação "anamneses_historico_progresso_medico" não existe, ignorando +2025-04-15T17:27:32.667-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:27:32.667-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fk2wdtp4d1fp3plwa1irevgxxth" da relação "anamneses_historico_progresso_medico" não existe, ignorando +2025-04-15T17:27:32.668-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:27:32.668-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fk5kj7c5g7y3kfcrm7bx8e30qod" da relação "token" não existe, ignorando +2025-04-15T17:27:32.669-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:27:32.669-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkp9adf0r99ppueo26leonkk3dj" da relação "tutor_contato" não existe, ignorando +2025-04-15T17:27:32.670-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:27:32.670-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkpkk8cikgtskg8dasw3tshtg02" da relação "tutor_contato" não existe, ignorando +2025-04-15T17:27:32.671-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:27:32.671-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkntx5ttgu7xkuccjc0upkfxvbg" da relação "tutor_endereco" não existe, ignorando +2025-04-15T17:27:32.672-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:27:32.672-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkpuwl7gfirj9402n0g37q50v98" da relação "tutor_endereco" não existe, ignorando +2025-04-15T17:27:32.672-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:27:32.674-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkooe7ghmjfibiiiaeumgu4lrr9" da relação "usuario_consultas" não existe, ignorando +2025-04-15T17:27:32.676-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T17:27:32.676-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkbfa7h15o0v6bdi8cfhediah0i" da relação "usuario_consultas" não existe, ignorando +2025-04-15T17:27:32.701-03:00 INFO 14724 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... +2025-04-15T17:27:32.706-03:00 INFO 14724 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. diff --git a/src/main/java/com/orbitech/npvet/controller/UsuarioController.java b/src/main/java/com/orbitech/npvet/controller/UsuarioController.java index 03b00a8..1541505 100644 --- a/src/main/java/com/orbitech/npvet/controller/UsuarioController.java +++ b/src/main/java/com/orbitech/npvet/controller/UsuarioController.java @@ -1,5 +1,6 @@ package com.orbitech.npvet.controller; +import com.orbitech.npvet.dto.UsuarioCadastrarDTO; import com.orbitech.npvet.dto.UsuarioDTO; import com.orbitech.npvet.entity.Usuario; import com.orbitech.npvet.service.UsuarioService; @@ -30,13 +31,13 @@ public class UsuarioController { } @PostMapping("/post") @PreAuthorize("hasAnyAuthority('ADMINISTRADOR')") - public ResponseEntitycreate(@Validated @RequestBody UsuarioDTO usuarioDTO, @AuthenticationPrincipal Usuario usuarioAutenticado){ + public ResponseEntitycreate(@Validated @RequestBody UsuarioCadastrarDTO usuarioDTO, @AuthenticationPrincipal Usuario usuarioAutenticado){ return ResponseEntity.ok(service.create(usuarioDTO, usuarioAutenticado)); } @PutMapping("/update/{id}") @PreAuthorize("hasAnyAuthority('ADMINISTRADOR')") - public ResponseEntityupdate(@AuthenticationPrincipal Usuario usuarioAutenticado, @PathVariable("id") final long id, @RequestBody @Validated UsuarioDTO usuarioDTO){ - return ResponseEntity.ok(service.update(id,usuarioDTO, usuarioAutenticado)); + public ResponseEntityupdate(@AuthenticationPrincipal Usuario usuarioAutenticado, @PathVariable("id") final long id, @RequestBody @Validated UsuarioCadastrarDTO UsuarioCadastrarDTO){ + return ResponseEntity.ok(service.update(id,UsuarioCadastrarDTO, usuarioAutenticado)); } @GetMapping("/nome/{nome}") diff --git a/src/main/java/com/orbitech/npvet/dto/UsuarioCadastrarDTO.java b/src/main/java/com/orbitech/npvet/dto/UsuarioCadastrarDTO.java new file mode 100644 index 0000000..4f2d0c5 --- /dev/null +++ b/src/main/java/com/orbitech/npvet/dto/UsuarioCadastrarDTO.java @@ -0,0 +1,59 @@ +package com.orbitech.npvet.dto; + +import com.orbitech.npvet.entity.Role; +import jakarta.persistence.*; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import org.hibernate.validator.constraints.br.CPF; + +import java.time.LocalDateTime; + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +public class UsuarioCadastrarDTO { + private String id; + // @NotNull(message = "Você precisa preencher um nome.") + @Size(max = 100, message = "Quantidade de caracteres excedida.") + private String nome; + + // @NotNull(message = "Você precisa preencher um CPF.") + @CPF(message = "CPF inválido.") + private String cpf; + + @Enumerated(EnumType.STRING) + @NotNull(message = "Você precisar definir o tipo de Usuário entre: SECRETARIA, ADMINISTRADOR ou MEDICO.") + private Role role; + + @NotNull(message = "Você precisa definir um nome de usuário.") + @Size(max = 30, message = "Quantidade de caracteres excedida.") + private String username; + + @NotNull(message = "Você precisa definir uma senha.") + @Size(max = 50, message = "Quantidade de caracteres excedida.") + private String password; + + private String token; + private LocalDateTime createdAt; + private LocalDateTime updatedAt; + private LocalDateTime deletedAt; + + public void roleStringSet(String role){ + this.role = Role.valueOf(role); + } + public String roleStringGet() { + return this.role.toString(); + } + + public void delete(){ + this.deletedAt = LocalDateTime.now(); + } + public void activate(){ + this.deletedAt = null; + } +} diff --git a/src/main/java/com/orbitech/npvet/entity/Usuario.java b/src/main/java/com/orbitech/npvet/entity/Usuario.java index 9cf6369..668a7c4 100644 --- a/src/main/java/com/orbitech/npvet/entity/Usuario.java +++ b/src/main/java/com/orbitech/npvet/entity/Usuario.java @@ -25,7 +25,7 @@ public class Usuario extends AbstractEntity implements UserDetails { @Column(length = 100, name = "nome") private String nome; - @Column(unique = true, length = 11, name = "cpf") + @Column(unique = true, length = 14, name = "cpf") private String cpf; @Enumerated(EnumType.STRING) diff --git a/src/main/java/com/orbitech/npvet/service/UsuarioService.java b/src/main/java/com/orbitech/npvet/service/UsuarioService.java index c466c4e..1d61c81 100644 --- a/src/main/java/com/orbitech/npvet/service/UsuarioService.java +++ b/src/main/java/com/orbitech/npvet/service/UsuarioService.java @@ -1,5 +1,6 @@ package com.orbitech.npvet.service; +import com.orbitech.npvet.dto.UsuarioCadastrarDTO; import com.orbitech.npvet.dto.UsuarioDTO; import com.orbitech.npvet.entity.Role; import com.orbitech.npvet.entity.Usuario; @@ -30,7 +31,12 @@ public Usuario toUsuarioEntidade(UsuarioDTO usuarioDTO){ return mapper.map(usuarioDTO, Usuario.class); } - public UsuarioDTO getById(String id){ + public Usuario toUsuarioEntidade(UsuarioCadastrarDTO usuarioDTO){ + return mapper.map(usuarioDTO, Usuario.class); + } + + + public UsuarioDTO getById(String id){ return toUsuarioDTO(repository.findById(id).orElse(null)); } @@ -38,17 +44,17 @@ public List getAll() { return repository.findAll().stream().map(this::toUsuarioDTO).toList(); } @Transactional - public UsuarioDTO create(UsuarioDTO usuarioDTO, Usuario usuarioAutenticado) { - Usuario usuarioByCpf = repository.findUsuarioByCpf(usuarioDTO.getCpf()); + public UsuarioDTO create(UsuarioCadastrarDTO usuarioCadastrarDTO, Usuario usuarioAutenticado) { + Usuario usuarioByCpf = repository.findUsuarioByCpf(usuarioCadastrarDTO.getCpf()); - Assert.isTrue(usuarioByCpf == null, String.format("Usuário com o CPF: {%s} já existe!",usuarioDTO.getCpf())); - UsuarioDTO usuarioDT = toUsuarioDTO(repository.save(toUsuarioEntidade(usuarioDTO))); + Assert.isTrue(usuarioByCpf == null, String.format("Usuário com o CPF: {%s} já existe!",usuarioCadastrarDTO.getCpf())); + UsuarioDTO usuarioDT = toUsuarioDTO(repository.save(toUsuarioEntidade(usuarioCadastrarDTO))); log.info("USUÁRIO:" + usuarioDT.getNome() + "NOME:" +usuarioDT.getNome()+ "USERNAME:" + usuarioDT.getUsername() + "CPF:" + usuarioDT.getCpf() + "| Criado por:" + usuarioAutenticado.getNome() + " "+ usuarioAutenticado.getId()); return usuarioDT; } @Transactional - public UsuarioDTO update(long id, UsuarioDTO usuarioDTO, Usuario usuarioAutenticado) { - UsuarioDTO usuarioDT = toUsuarioDTO(repository.save(toUsuarioEntidade(usuarioDTO))); + public UsuarioDTO update(long id, UsuarioCadastrarDTO UsuarioCadastrarDTO, Usuario usuarioAutenticado) { + UsuarioDTO usuarioDT = toUsuarioDTO(repository.save(toUsuarioEntidade(UsuarioCadastrarDTO))); log.info("USUÁRIO:" + usuarioDT.getNome() + "NOME:" +usuarioDT.getNome()+ "USERNAME:" + usuarioDT.getUsername() + "CPF:" + usuarioDT.getCpf() + "| Atualizado por:" + usuarioAutenticado.getNome() + " "+ usuarioAutenticado.getId()); return usuarioDT; } From 6ae112c222472fff76ae90e4a7df601e8ce7d57c Mon Sep 17 00:00:00 2001 From: Jean Felipe Moschen Buss Date: Tue, 15 Apr 2025 17:58:25 -0300 Subject: [PATCH 12/29] Fix: nome do container staging --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 5caea52..066ebf0 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -136,7 +136,7 @@ jobs: - name: Deploy no Cloud Run run: | - gcloud run deploy npvet-backend \ + gcloud run deploy npvet-backend-staging \ --image ghcr.io/orbitechz/npvet-backend-cloud:staging \ --region us-central1 \ --platform managed From f4a5d29c8c948d9e764370214c195cdb0827450c Mon Sep 17 00:00:00 2001 From: Jean Felipe Moschen Buss Date: Tue, 15 Apr 2025 18:13:56 -0300 Subject: [PATCH 13/29] Fix: Uso do gcr --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index caae9d9..bb4dc9d 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -155,6 +155,6 @@ jobs: - name: Deploy no Cloud Run run: | gcloud run deploy npvet-backend-staging \ - --image ghcr.io/orbitechz/npvet-backend-cloud:staging \ + --image gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:staging \ --region us-central1 \ --platform managed From 8b06c00439801f2fc7541e58934e33b3048a1075 Mon Sep 17 00:00:00 2001 From: Piegat Date: Tue, 15 Apr 2025 19:02:25 -0300 Subject: [PATCH 14/29] =?UTF-8?q?Corrigido=20delete=20dos=20usu=C3=A1rios?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/orbitech/npvet/service/UsuarioService.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/orbitech/npvet/service/UsuarioService.java b/src/main/java/com/orbitech/npvet/service/UsuarioService.java index 1d61c81..bbd3e3f 100644 --- a/src/main/java/com/orbitech/npvet/service/UsuarioService.java +++ b/src/main/java/com/orbitech/npvet/service/UsuarioService.java @@ -27,6 +27,10 @@ public UsuarioDTO toUsuarioDTO(Usuario usuarioEntidade){ return mapper.map(usuarioEntidade, UsuarioDTO.class); } + public UsuarioCadastrarDTO toUsuarioCadastrarDTO(Usuario usuarioEntidade){ + return mapper.map(usuarioEntidade, UsuarioCadastrarDTO.class); + } + public Usuario toUsuarioEntidade(UsuarioDTO usuarioDTO){ return mapper.map(usuarioDTO, Usuario.class); } @@ -40,6 +44,10 @@ public UsuarioDTO getById(String id){ return toUsuarioDTO(repository.findById(id).orElse(null)); } + public UsuarioCadastrarDTO getByIdForDelete(String id){ + return toUsuarioCadastrarDTO(repository.findById(id).orElse(null)); + } + public List getAll() { return repository.findAll().stream().map(this::toUsuarioDTO).toList(); } @@ -112,7 +120,7 @@ public UsuarioDTO getUsuarioByCpf(String cpf){ @Transactional public UsuarioDTO delete(String id, Usuario usuarioAutenticado){ - UsuarioDTO userById = getById(id); + UsuarioCadastrarDTO userById = getByIdForDelete(id); userById.delete(); UsuarioDTO usuarioDT = toUsuarioDTO(repository.save(toUsuarioEntidade(userById))); log.info("USUÁRIO:" + usuarioDT.getNome() + "NOME:" +usuarioDT.getNome()+ "USERNAME:" + usuarioDT.getUsername() + "CPF:" + usuarioDT.getCpf() + "| Deletado por:" + usuarioAutenticado.getNome() + " "+ usuarioAutenticado.getId()); From eb7f7c675d38acbf29af947386d99881aa7398f1 Mon Sep 17 00:00:00 2001 From: Piegat Date: Tue, 15 Apr 2025 19:22:44 -0300 Subject: [PATCH 15/29] Adicionado encode de senha --- .../java/com/orbitech/npvet/service/UsuarioService.java | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/main/java/com/orbitech/npvet/service/UsuarioService.java b/src/main/java/com/orbitech/npvet/service/UsuarioService.java index bbd3e3f..07b0b67 100644 --- a/src/main/java/com/orbitech/npvet/service/UsuarioService.java +++ b/src/main/java/com/orbitech/npvet/service/UsuarioService.java @@ -9,6 +9,7 @@ import lombok.extern.slf4j.Slf4j; import org.modelmapper.ModelMapper; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.util.Assert; @@ -21,6 +22,9 @@ public class UsuarioService { @Autowired private UsuarioRepository repository; + private PasswordEncoder passwordEncoder; + + private final ModelMapper mapper = new ModelMapper(); public UsuarioDTO toUsuarioDTO(Usuario usuarioEntidade){ @@ -53,6 +57,11 @@ public List getAll() { } @Transactional public UsuarioDTO create(UsuarioCadastrarDTO usuarioCadastrarDTO, Usuario usuarioAutenticado) { + + String encodedPassword = passwordEncoder.encode(usuarioCadastrarDTO.getPassword()); + + usuarioAutenticado.setPassword(encodedPassword); + Usuario usuarioByCpf = repository.findUsuarioByCpf(usuarioCadastrarDTO.getCpf()); Assert.isTrue(usuarioByCpf == null, String.format("Usuário com o CPF: {%s} já existe!",usuarioCadastrarDTO.getCpf())); From cd81135c47db648e6eabfafb4b945ec8ef4150ff Mon Sep 17 00:00:00 2001 From: gustavoemf Date: Tue, 15 Apr 2025 19:31:52 -0300 Subject: [PATCH 16/29] =?UTF-8?q?inser=C3=A7=C3=A3o=20de=20testes=20de=20e?= =?UTF-8?q?ntidade=20e=20dtos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logs.log | 528 ++++++++++++++++++ .../npvet/DTOTest/AnamneseDTOTest.java | 71 +++ .../orbitech/npvet/DTOTest/AnimalDTOTest.java | 64 +++ .../npvet/DTOTest/ContatoDTOTest.java | 43 ++ .../npvet/DTOTest/EnderecoDTOTest.java | 74 +++ .../npvet/DTOTest/ExameFisicoDTOTest.java | 102 ++++ .../orbitech/npvet/DTOTest/TutorDTOTest.java | 78 +++ .../npvet/DTOTest/UsuarioDtoTest.java | 56 ++ .../orbitech/npvet/DTOTest/VacinaDTOTest.java | 60 ++ .../EntityTest/AnamneseHistoricoTest.java | 56 ++ .../EntityTest/AnamnesePerguntaTest.java | 63 +++ .../npvet/EntityTest/AnamneseTest.java | 137 +++++ .../orbitech/npvet/EntityTest/AnimalTest.java | 88 +++ .../npvet/EntityTest/ContatoTest.java | 42 ++ .../npvet/EntityTest/EnderecoTest.java | 74 +++ .../npvet/EntityTest/ExameFisicoTest.java | 124 ++++ .../npvet/EntityTest/PerguntaTest.java | 69 +++ .../orbitech/npvet/EntityTest/TutorTest.java | 73 +++ .../npvet/EntityTest/UsuarioTest.java | 56 ++ .../orbitech/npvet/EntityTest/VacinaTest.java | 58 ++ .../orbitech/npvet/NpvetApplicationTests.java | 17 + 21 files changed, 1933 insertions(+) create mode 100644 logs.log create mode 100644 src/test/java/com/orbitech/npvet/DTOTest/AnamneseDTOTest.java create mode 100644 src/test/java/com/orbitech/npvet/DTOTest/AnimalDTOTest.java create mode 100644 src/test/java/com/orbitech/npvet/DTOTest/ContatoDTOTest.java create mode 100644 src/test/java/com/orbitech/npvet/DTOTest/EnderecoDTOTest.java create mode 100644 src/test/java/com/orbitech/npvet/DTOTest/ExameFisicoDTOTest.java create mode 100644 src/test/java/com/orbitech/npvet/DTOTest/TutorDTOTest.java create mode 100644 src/test/java/com/orbitech/npvet/DTOTest/UsuarioDtoTest.java create mode 100644 src/test/java/com/orbitech/npvet/DTOTest/VacinaDTOTest.java create mode 100644 src/test/java/com/orbitech/npvet/EntityTest/AnamneseHistoricoTest.java create mode 100644 src/test/java/com/orbitech/npvet/EntityTest/AnamnesePerguntaTest.java create mode 100644 src/test/java/com/orbitech/npvet/EntityTest/AnamneseTest.java create mode 100644 src/test/java/com/orbitech/npvet/EntityTest/AnimalTest.java create mode 100644 src/test/java/com/orbitech/npvet/EntityTest/ContatoTest.java create mode 100644 src/test/java/com/orbitech/npvet/EntityTest/EnderecoTest.java create mode 100644 src/test/java/com/orbitech/npvet/EntityTest/ExameFisicoTest.java create mode 100644 src/test/java/com/orbitech/npvet/EntityTest/PerguntaTest.java create mode 100644 src/test/java/com/orbitech/npvet/EntityTest/TutorTest.java create mode 100644 src/test/java/com/orbitech/npvet/EntityTest/UsuarioTest.java create mode 100644 src/test/java/com/orbitech/npvet/EntityTest/VacinaTest.java create mode 100644 src/test/java/com/orbitech/npvet/NpvetApplicationTests.java diff --git a/logs.log b/logs.log new file mode 100644 index 0000000..8b33fb8 --- /dev/null +++ b/logs.log @@ -0,0 +1,528 @@ +2025-04-15T19:29:26.485-03:00 INFO 6067 --- [main] c.o.npvet.EntityTest.PerguntaTest : Starting PerguntaTest using Java 17.0.14 with PID 6067 (started by gustavo_parquetec in /home/gustavo_parquetec/Documentos/faculdade/NPVet-Backend-Cloud) +2025-04-15T19:29:26.486-03:00 INFO 6067 --- [main] c.o.npvet.EntityTest.PerguntaTest : No active profile set, falling back to 1 default profile: "default" +2025-04-15T19:29:26.803-03:00 INFO 6067 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2025-04-15T19:29:26.839-03:00 INFO 6067 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 32 ms. Found 11 JPA repository interfaces. +2025-04-15T19:29:27.128-03:00 INFO 6067 --- [main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] +2025-04-15T19:29:27.156-03:00 INFO 6067 --- [main] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.2.7.Final +2025-04-15T19:29:27.158-03:00 INFO 6067 --- [main] org.hibernate.cfg.Environment : HHH000406: Using bytecode reflection optimizer +2025-04-15T19:29:27.224-03:00 INFO 6067 --- [main] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy +2025-04-15T19:29:27.293-03:00 INFO 6067 --- [main] o.s.o.j.p.SpringPersistenceUnitInfo : No LoadTimeWeaver setup: ignoring JPA class transformer +2025-04-15T19:29:27.302-03:00 INFO 6067 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... +2025-04-15T19:29:27.406-03:00 INFO 6067 --- [main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@e4ca109 +2025-04-15T19:29:27.408-03:00 INFO 6067 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. +2025-04-15T19:29:27.603-03:00 INFO 6067 --- [main] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy +2025-04-15T19:29:28.127-03:00 INFO 6067 --- [main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] +2025-04-15T19:29:28.137-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.137-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses" does not exist, skipping +2025-04-15T19:29:28.137-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.137-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses" does not exist, skipping +2025-04-15T19:29:28.138-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.138-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses" does not exist, skipping +2025-04-15T19:29:28.138-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.138-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "animal" does not exist, skipping +2025-04-15T19:29:28.138-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.139-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "consulta" does not exist, skipping +2025-04-15T19:29:28.139-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.139-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "consulta" does not exist, skipping +2025-04-15T19:29:28.139-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.139-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "consulta" does not exist, skipping +2025-04-15T19:29:28.140-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.140-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "consulta" does not exist, skipping +2025-04-15T19:29:28.140-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.140-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "exame_fisico" does not exist, skipping +2025-04-15T19:29:28.140-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.140-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "exame_fisico" does not exist, skipping +2025-04-15T19:29:28.141-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.141-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "vacina" does not exist, skipping +2025-04-15T19:29:28.141-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.141-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamnese-pergunta" does not exist, skipping +2025-04-15T19:29:28.141-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.142-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamnese_historico" does not exist, skipping +2025-04-15T19:29:28.142-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.142-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamneses" does not exist, skipping +2025-04-15T19:29:28.142-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.142-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "animal" does not exist, skipping +2025-04-15T19:29:28.142-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.142-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "consulta" does not exist, skipping +2025-04-15T19:29:28.143-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.143-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "contato" does not exist, skipping +2025-04-15T19:29:28.143-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.143-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "endereco" does not exist, skipping +2025-04-15T19:29:28.143-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.143-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "exame_fisico" does not exist, skipping +2025-04-15T19:29:28.143-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.143-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "perguntas" does not exist, skipping +2025-04-15T19:29:28.143-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.144-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "tutor" does not exist, skipping +2025-04-15T19:29:28.144-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.144-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "usuario" does not exist, skipping +2025-04-15T19:29:28.144-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.144-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "vacina" does not exist, skipping +2025-04-15T19:29:28.144-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.144-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses_anamnese_perguntas" does not exist, skipping +2025-04-15T19:29:28.144-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.145-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses_anamnese_perguntas" does not exist, skipping +2025-04-15T19:29:28.145-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.145-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses_historico_progresso_medico" does not exist, skipping +2025-04-15T19:29:28.145-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.145-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses_historico_progresso_medico" does not exist, skipping +2025-04-15T19:29:28.145-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.145-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "token" does not exist, skipping +2025-04-15T19:29:28.146-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.146-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "tutor_contato" does not exist, skipping +2025-04-15T19:29:28.146-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.146-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "tutor_contato" does not exist, skipping +2025-04-15T19:29:28.146-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.146-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "tutor_endereco" does not exist, skipping +2025-04-15T19:29:28.146-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.146-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "tutor_endereco" does not exist, skipping +2025-04-15T19:29:28.147-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.147-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "usuario_consultas" does not exist, skipping +2025-04-15T19:29:28.147-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.147-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "usuario_consultas" does not exist, skipping +2025-04-15T19:29:28.147-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.147-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamneses_anamnese_perguntas" does not exist, skipping +2025-04-15T19:29:28.147-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.147-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamneses_historico_progresso_medico" does not exist, skipping +2025-04-15T19:29:28.147-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.147-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "token" does not exist, skipping +2025-04-15T19:29:28.148-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.148-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "tutor_contato" does not exist, skipping +2025-04-15T19:29:28.148-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.148-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "tutor_endereco" does not exist, skipping +2025-04-15T19:29:28.148-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.148-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "usuario_consultas" does not exist, skipping +2025-04-15T19:29:28.149-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:28.149-03:00 WARN 6067 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : sequence "token_seq" does not exist, skipping +2025-04-15T19:29:28.272-03:00 INFO 6067 --- [main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' +2025-04-15T19:29:28.513-03:00 INFO 6067 --- [main] o.s.d.j.r.query.QueryEnhancerFactory : Hibernate is in classpath; If applicable, HQL parser will be used. +2025-04-15T19:29:29.271-03:00 WARN 6067 --- [main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning +2025-04-15T19:29:29.330-03:00 INFO 6067 --- [main] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@77f3bb3f, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@42b2a977, org.springframework.security.web.context.SecurityContextHolderFilter@5901caf8, org.springframework.security.web.header.HeaderWriterFilter@75c858e6, org.springframework.security.web.authentication.logout.LogoutFilter@55aa97df, com.orbitech.npvet.oauth.jwt.JwtAuthenticationFilter@1fb029e, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@18b378a2, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@4a5f435b, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@e646b14, org.springframework.security.web.access.ExceptionTranslationFilter@53b83e49, org.springframework.security.web.access.intercept.AuthorizationFilter@21b298de] +2025-04-15T19:29:29.736-03:00 INFO 6067 --- [main] c.o.npvet.EntityTest.PerguntaTest : Started PerguntaTest in 3.396 seconds (process running for 4.15) +2025-04-15T19:29:29.991-03:00 INFO 6067 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.ExameFisicoTest]: ExameFisicoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:29:29.992-03:00 INFO 6067 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.ExameFisicoTest +2025-04-15T19:29:30.046-03:00 INFO 6067 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.AnimalDTOTest]: AnimalDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:29:30.051-03:00 INFO 6067 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.AnimalDTOTest +2025-04-15T19:29:30.067-03:00 INFO 6067 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.VacinaDTOTest]: VacinaDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:29:30.067-03:00 INFO 6067 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.VacinaDTOTest +2025-04-15T19:29:30.109-03:00 INFO 6067 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.VacinaTest]: VacinaTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:29:30.109-03:00 INFO 6067 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.VacinaTest +2025-04-15T19:29:30.123-03:00 INFO 6067 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.AnamneseTest]: AnamneseTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:29:30.124-03:00 INFO 6067 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.AnamneseTest +2025-04-15T19:29:30.133-03:00 INFO 6067 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.UsuarioTest]: UsuarioTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:29:30.134-03:00 INFO 6067 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.UsuarioTest +2025-04-15T19:29:30.147-03:00 INFO 6067 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.NpvetApplicationTests]: NpvetApplicationTests does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:29:30.150-03:00 INFO 6067 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.NpvetApplicationTests +2025-04-15T19:29:30.156-03:00 INFO 6067 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.UsuarioDtoTest]: UsuarioDtoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:29:30.156-03:00 INFO 6067 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.UsuarioDtoTest +2025-04-15T19:29:30.164-03:00 INFO 6067 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.TutorTest]: TutorTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:29:30.165-03:00 INFO 6067 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.TutorTest +2025-04-15T19:29:30.176-03:00 INFO 6067 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.AnamneseHistoricoTest]: AnamneseHistoricoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:29:30.177-03:00 INFO 6067 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.AnamneseHistoricoTest +2025-04-15T19:29:30.181-03:00 INFO 6067 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.ExameFisicoDTOTest]: ExameFisicoDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:29:30.181-03:00 INFO 6067 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.ExameFisicoDTOTest +2025-04-15T19:29:30.194-03:00 INFO 6067 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.ContatoTest]: ContatoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:29:30.195-03:00 INFO 6067 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.ContatoTest +2025-04-15T19:29:30.201-03:00 INFO 6067 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.AnimalTest]: AnimalTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:29:30.202-03:00 INFO 6067 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.AnimalTest +2025-04-15T19:29:30.215-03:00 INFO 6067 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.ContatoDTOTest]: ContatoDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:29:30.217-03:00 INFO 6067 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.ContatoDTOTest +2025-04-15T19:29:30.227-03:00 INFO 6067 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.EnderecoTest]: EnderecoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:29:30.230-03:00 INFO 6067 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.EnderecoTest +2025-04-15T19:29:30.247-03:00 INFO 6067 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.EnderecoDTOTest]: EnderecoDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:29:30.248-03:00 INFO 6067 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.EnderecoDTOTest +2025-04-15T19:29:30.262-03:00 INFO 6067 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.TutorDTOTest]: TutorDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:29:30.263-03:00 INFO 6067 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.TutorDTOTest +2025-04-15T19:29:30.279-03:00 INFO 6067 --- [SpringApplicationShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' +2025-04-15T19:29:30.294-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:30.294-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkryqhlmk35ogpp3jxx4rh68yk6 on table anamneses_anamnese_perguntas +2025-04-15T19:29:30.295-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:30.296-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkj180gtcsb792u2fk8bv1ritss on table anamneses_historico_progresso_medico +2025-04-15T19:29:30.300-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:30.300-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to 2 other objects +2025-04-15T19:29:30.303-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:30.303-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkooe7ghmjfibiiiaeumgu4lrr9 on table usuario_consultas +2025-04-15T19:29:30.305-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:30.305-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkp9adf0r99ppueo26leonkk3dj on table tutor_contato +2025-04-15T19:29:30.306-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:30.306-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkntx5ttgu7xkuccjc0upkfxvbg on table tutor_endereco +2025-04-15T19:29:30.310-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:30.311-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to 2 other objects +2025-04-15T19:29:30.312-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:30.312-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to 2 other objects +2025-04-15T19:29:30.314-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:30.314-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkryqhlmk35ogpp3jxx4rh68yk6" of relation "anamneses_anamnese_perguntas" does not exist, skipping +2025-04-15T19:29:30.315-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:30.315-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkn181obfnf7s68nnoj6r159a67" of relation "anamneses_anamnese_perguntas" does not exist, skipping +2025-04-15T19:29:30.316-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:30.316-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkj180gtcsb792u2fk8bv1ritss" of relation "anamneses_historico_progresso_medico" does not exist, skipping +2025-04-15T19:29:30.317-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:30.317-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fk2wdtp4d1fp3plwa1irevgxxth" of relation "anamneses_historico_progresso_medico" does not exist, skipping +2025-04-15T19:29:30.318-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:30.318-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fk5kj7c5g7y3kfcrm7bx8e30qod" of relation "token" does not exist, skipping +2025-04-15T19:29:30.319-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:30.319-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkp9adf0r99ppueo26leonkk3dj" of relation "tutor_contato" does not exist, skipping +2025-04-15T19:29:30.320-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:30.320-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkpkk8cikgtskg8dasw3tshtg02" of relation "tutor_contato" does not exist, skipping +2025-04-15T19:29:30.321-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:30.321-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkntx5ttgu7xkuccjc0upkfxvbg" of relation "tutor_endereco" does not exist, skipping +2025-04-15T19:29:30.322-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:30.322-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkpuwl7gfirj9402n0g37q50v98" of relation "tutor_endereco" does not exist, skipping +2025-04-15T19:29:30.322-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:30.322-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkooe7ghmjfibiiiaeumgu4lrr9" of relation "usuario_consultas" does not exist, skipping +2025-04-15T19:29:30.323-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:29:30.323-03:00 WARN 6067 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkbfa7h15o0v6bdi8cfhediah0i" of relation "usuario_consultas" does not exist, skipping +2025-04-15T19:29:30.333-03:00 INFO 6067 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... +2025-04-15T19:29:30.334-03:00 INFO 6067 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. +2025-04-15T19:30:06.817-03:00 INFO 6347 --- [main] c.o.npvet.EntityTest.PerguntaTest : Starting PerguntaTest using Java 17.0.14 with PID 6347 (started by gustavo_parquetec in /home/gustavo_parquetec/Documentos/faculdade/NPVet-Backend-Cloud) +2025-04-15T19:30:06.818-03:00 INFO 6347 --- [main] c.o.npvet.EntityTest.PerguntaTest : No active profile set, falling back to 1 default profile: "default" +2025-04-15T19:30:07.160-03:00 INFO 6347 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2025-04-15T19:30:07.200-03:00 INFO 6347 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 35 ms. Found 11 JPA repository interfaces. +2025-04-15T19:30:07.479-03:00 INFO 6347 --- [main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] +2025-04-15T19:30:07.505-03:00 INFO 6347 --- [main] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.2.7.Final +2025-04-15T19:30:07.506-03:00 INFO 6347 --- [main] org.hibernate.cfg.Environment : HHH000406: Using bytecode reflection optimizer +2025-04-15T19:30:07.577-03:00 INFO 6347 --- [main] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy +2025-04-15T19:30:07.668-03:00 INFO 6347 --- [main] o.s.o.j.p.SpringPersistenceUnitInfo : No LoadTimeWeaver setup: ignoring JPA class transformer +2025-04-15T19:30:07.686-03:00 INFO 6347 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... +2025-04-15T19:30:07.797-03:00 INFO 6347 --- [main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@4efb13f1 +2025-04-15T19:30:07.799-03:00 INFO 6347 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. +2025-04-15T19:30:08.020-03:00 INFO 6347 --- [main] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy +2025-04-15T19:30:08.591-03:00 INFO 6347 --- [main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] +2025-04-15T19:30:08.601-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.601-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses" does not exist, skipping +2025-04-15T19:30:08.602-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.602-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses" does not exist, skipping +2025-04-15T19:30:08.602-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.602-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses" does not exist, skipping +2025-04-15T19:30:08.603-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.603-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "animal" does not exist, skipping +2025-04-15T19:30:08.603-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.603-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "consulta" does not exist, skipping +2025-04-15T19:30:08.603-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.604-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "consulta" does not exist, skipping +2025-04-15T19:30:08.604-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.604-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "consulta" does not exist, skipping +2025-04-15T19:30:08.604-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.604-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "consulta" does not exist, skipping +2025-04-15T19:30:08.604-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.604-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "exame_fisico" does not exist, skipping +2025-04-15T19:30:08.605-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.605-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "exame_fisico" does not exist, skipping +2025-04-15T19:30:08.605-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.605-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "vacina" does not exist, skipping +2025-04-15T19:30:08.605-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.605-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamnese-pergunta" does not exist, skipping +2025-04-15T19:30:08.606-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.606-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamnese_historico" does not exist, skipping +2025-04-15T19:30:08.606-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.606-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamneses" does not exist, skipping +2025-04-15T19:30:08.606-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.606-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "animal" does not exist, skipping +2025-04-15T19:30:08.607-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.607-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "consulta" does not exist, skipping +2025-04-15T19:30:08.607-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.607-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "contato" does not exist, skipping +2025-04-15T19:30:08.607-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.607-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "endereco" does not exist, skipping +2025-04-15T19:30:08.607-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.607-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "exame_fisico" does not exist, skipping +2025-04-15T19:30:08.608-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.608-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "perguntas" does not exist, skipping +2025-04-15T19:30:08.608-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.608-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "tutor" does not exist, skipping +2025-04-15T19:30:08.608-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.608-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "usuario" does not exist, skipping +2025-04-15T19:30:08.608-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.608-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "vacina" does not exist, skipping +2025-04-15T19:30:08.609-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.609-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses_anamnese_perguntas" does not exist, skipping +2025-04-15T19:30:08.609-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.609-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses_anamnese_perguntas" does not exist, skipping +2025-04-15T19:30:08.609-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.609-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses_historico_progresso_medico" does not exist, skipping +2025-04-15T19:30:08.610-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.610-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses_historico_progresso_medico" does not exist, skipping +2025-04-15T19:30:08.610-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.610-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "token" does not exist, skipping +2025-04-15T19:30:08.610-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.610-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "tutor_contato" does not exist, skipping +2025-04-15T19:30:08.611-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.611-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "tutor_contato" does not exist, skipping +2025-04-15T19:30:08.611-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.611-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "tutor_endereco" does not exist, skipping +2025-04-15T19:30:08.611-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.611-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "tutor_endereco" does not exist, skipping +2025-04-15T19:30:08.611-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.611-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "usuario_consultas" does not exist, skipping +2025-04-15T19:30:08.612-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.612-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "usuario_consultas" does not exist, skipping +2025-04-15T19:30:08.612-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.612-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamneses_anamnese_perguntas" does not exist, skipping +2025-04-15T19:30:08.612-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.612-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamneses_historico_progresso_medico" does not exist, skipping +2025-04-15T19:30:08.612-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.613-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "token" does not exist, skipping +2025-04-15T19:30:08.613-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.613-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "tutor_contato" does not exist, skipping +2025-04-15T19:30:08.613-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.613-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "tutor_endereco" does not exist, skipping +2025-04-15T19:30:08.613-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.613-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "usuario_consultas" does not exist, skipping +2025-04-15T19:30:08.613-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:08.614-03:00 WARN 6347 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : sequence "token_seq" does not exist, skipping +2025-04-15T19:30:08.731-03:00 INFO 6347 --- [main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' +2025-04-15T19:30:09.028-03:00 INFO 6347 --- [main] o.s.d.j.r.query.QueryEnhancerFactory : Hibernate is in classpath; If applicable, HQL parser will be used. +2025-04-15T19:30:09.760-03:00 WARN 6347 --- [main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning +2025-04-15T19:30:09.827-03:00 INFO 6347 --- [main] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@2a987a5d, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@13180cc9, org.springframework.security.web.context.SecurityContextHolderFilter@e646b14, org.springframework.security.web.header.HeaderWriterFilter@46a6c3be, org.springframework.security.web.authentication.logout.LogoutFilter@3918a9f9, com.orbitech.npvet.oauth.jwt.JwtAuthenticationFilter@669bb57, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@14ef94ec, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@74cca90, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@58211c07, org.springframework.security.web.access.ExceptionTranslationFilter@21b298de, org.springframework.security.web.access.intercept.AuthorizationFilter@74a9a20d] +2025-04-15T19:30:10.216-03:00 INFO 6347 --- [main] c.o.npvet.EntityTest.PerguntaTest : Started PerguntaTest in 3.534 seconds (process running for 4.175) +2025-04-15T19:30:10.477-03:00 INFO 6347 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.ExameFisicoTest]: ExameFisicoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:10.479-03:00 INFO 6347 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.ExameFisicoTest +2025-04-15T19:30:10.553-03:00 INFO 6347 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.AnimalDTOTest]: AnimalDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:10.559-03:00 INFO 6347 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.AnimalDTOTest +2025-04-15T19:30:10.579-03:00 INFO 6347 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.VacinaDTOTest]: VacinaDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:10.580-03:00 INFO 6347 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.VacinaDTOTest +2025-04-15T19:30:10.626-03:00 INFO 6347 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.VacinaTest]: VacinaTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:10.628-03:00 INFO 6347 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.VacinaTest +2025-04-15T19:30:10.643-03:00 INFO 6347 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.AnamneseTest]: AnamneseTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:10.644-03:00 INFO 6347 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.AnamneseTest +2025-04-15T19:30:10.654-03:00 INFO 6347 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.UsuarioTest]: UsuarioTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:10.655-03:00 INFO 6347 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.UsuarioTest +2025-04-15T19:30:10.669-03:00 INFO 6347 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.NpvetApplicationTests]: NpvetApplicationTests does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:10.671-03:00 INFO 6347 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.NpvetApplicationTests +2025-04-15T19:30:10.676-03:00 INFO 6347 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.UsuarioDtoTest]: UsuarioDtoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:10.676-03:00 INFO 6347 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.UsuarioDtoTest +2025-04-15T19:30:10.688-03:00 INFO 6347 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.TutorTest]: TutorTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:10.689-03:00 INFO 6347 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.TutorTest +2025-04-15T19:30:10.698-03:00 INFO 6347 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.AnamneseHistoricoTest]: AnamneseHistoricoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:10.699-03:00 INFO 6347 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.AnamneseHistoricoTest +2025-04-15T19:30:10.702-03:00 INFO 6347 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.ExameFisicoDTOTest]: ExameFisicoDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:10.703-03:00 INFO 6347 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.ExameFisicoDTOTest +2025-04-15T19:30:10.716-03:00 INFO 6347 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.ContatoTest]: ContatoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:10.717-03:00 INFO 6347 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.ContatoTest +2025-04-15T19:30:10.723-03:00 INFO 6347 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.AnimalTest]: AnimalTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:10.724-03:00 INFO 6347 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.AnimalTest +2025-04-15T19:30:10.736-03:00 INFO 6347 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.ContatoDTOTest]: ContatoDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:10.737-03:00 INFO 6347 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.ContatoDTOTest +2025-04-15T19:30:10.744-03:00 INFO 6347 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.EnderecoTest]: EnderecoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:10.746-03:00 INFO 6347 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.EnderecoTest +2025-04-15T19:30:10.757-03:00 INFO 6347 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.EnderecoDTOTest]: EnderecoDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:10.758-03:00 INFO 6347 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.EnderecoDTOTest +2025-04-15T19:30:10.770-03:00 INFO 6347 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.TutorDTOTest]: TutorDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:10.770-03:00 INFO 6347 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.TutorDTOTest +2025-04-15T19:30:10.783-03:00 INFO 6347 --- [SpringApplicationShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' +2025-04-15T19:30:10.801-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:10.802-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkryqhlmk35ogpp3jxx4rh68yk6 on table anamneses_anamnese_perguntas +2025-04-15T19:30:10.803-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:10.803-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkj180gtcsb792u2fk8bv1ritss on table anamneses_historico_progresso_medico +2025-04-15T19:30:10.806-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:10.806-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to 2 other objects +2025-04-15T19:30:10.809-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:10.809-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkooe7ghmjfibiiiaeumgu4lrr9 on table usuario_consultas +2025-04-15T19:30:10.810-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:10.811-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkp9adf0r99ppueo26leonkk3dj on table tutor_contato +2025-04-15T19:30:10.812-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:10.812-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkntx5ttgu7xkuccjc0upkfxvbg on table tutor_endereco +2025-04-15T19:30:10.816-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:10.816-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to 2 other objects +2025-04-15T19:30:10.819-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:10.819-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to 2 other objects +2025-04-15T19:30:10.822-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:10.822-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkryqhlmk35ogpp3jxx4rh68yk6" of relation "anamneses_anamnese_perguntas" does not exist, skipping +2025-04-15T19:30:10.823-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:10.823-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkn181obfnf7s68nnoj6r159a67" of relation "anamneses_anamnese_perguntas" does not exist, skipping +2025-04-15T19:30:10.823-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:10.824-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkj180gtcsb792u2fk8bv1ritss" of relation "anamneses_historico_progresso_medico" does not exist, skipping +2025-04-15T19:30:10.824-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:10.824-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fk2wdtp4d1fp3plwa1irevgxxth" of relation "anamneses_historico_progresso_medico" does not exist, skipping +2025-04-15T19:30:10.825-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:10.825-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fk5kj7c5g7y3kfcrm7bx8e30qod" of relation "token" does not exist, skipping +2025-04-15T19:30:10.826-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:10.826-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkp9adf0r99ppueo26leonkk3dj" of relation "tutor_contato" does not exist, skipping +2025-04-15T19:30:10.827-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:10.827-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkpkk8cikgtskg8dasw3tshtg02" of relation "tutor_contato" does not exist, skipping +2025-04-15T19:30:10.828-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:10.828-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkntx5ttgu7xkuccjc0upkfxvbg" of relation "tutor_endereco" does not exist, skipping +2025-04-15T19:30:10.829-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:10.829-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkpuwl7gfirj9402n0g37q50v98" of relation "tutor_endereco" does not exist, skipping +2025-04-15T19:30:10.830-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:10.830-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkooe7ghmjfibiiiaeumgu4lrr9" of relation "usuario_consultas" does not exist, skipping +2025-04-15T19:30:10.831-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:10.831-03:00 WARN 6347 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkbfa7h15o0v6bdi8cfhediah0i" of relation "usuario_consultas" does not exist, skipping +2025-04-15T19:30:10.840-03:00 INFO 6347 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... +2025-04-15T19:30:10.841-03:00 INFO 6347 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. +2025-04-15T19:30:26.583-03:00 INFO 6517 --- [main] c.o.npvet.EntityTest.PerguntaTest : Starting PerguntaTest using Java 17.0.14 with PID 6517 (started by gustavo_parquetec in /home/gustavo_parquetec/Documentos/faculdade/NPVet-Backend-Cloud) +2025-04-15T19:30:26.584-03:00 INFO 6517 --- [main] c.o.npvet.EntityTest.PerguntaTest : No active profile set, falling back to 1 default profile: "default" +2025-04-15T19:30:26.916-03:00 INFO 6517 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2025-04-15T19:30:26.953-03:00 INFO 6517 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 33 ms. Found 11 JPA repository interfaces. +2025-04-15T19:30:27.235-03:00 INFO 6517 --- [main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] +2025-04-15T19:30:27.261-03:00 INFO 6517 --- [main] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.2.7.Final +2025-04-15T19:30:27.263-03:00 INFO 6517 --- [main] org.hibernate.cfg.Environment : HHH000406: Using bytecode reflection optimizer +2025-04-15T19:30:27.327-03:00 INFO 6517 --- [main] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy +2025-04-15T19:30:27.395-03:00 INFO 6517 --- [main] o.s.o.j.p.SpringPersistenceUnitInfo : No LoadTimeWeaver setup: ignoring JPA class transformer +2025-04-15T19:30:27.404-03:00 INFO 6517 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... +2025-04-15T19:30:27.506-03:00 INFO 6517 --- [main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@3ee6dc82 +2025-04-15T19:30:27.508-03:00 INFO 6517 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. +2025-04-15T19:30:27.684-03:00 INFO 6517 --- [main] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy +2025-04-15T19:30:28.204-03:00 INFO 6517 --- [main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] +2025-04-15T19:30:28.214-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.214-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses" does not exist, skipping +2025-04-15T19:30:28.215-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.215-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses" does not exist, skipping +2025-04-15T19:30:28.215-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.215-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses" does not exist, skipping +2025-04-15T19:30:28.215-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.215-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "animal" does not exist, skipping +2025-04-15T19:30:28.216-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.216-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "consulta" does not exist, skipping +2025-04-15T19:30:28.216-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.216-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "consulta" does not exist, skipping +2025-04-15T19:30:28.216-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.216-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "consulta" does not exist, skipping +2025-04-15T19:30:28.217-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.217-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "consulta" does not exist, skipping +2025-04-15T19:30:28.217-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.217-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "exame_fisico" does not exist, skipping +2025-04-15T19:30:28.217-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.217-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "exame_fisico" does not exist, skipping +2025-04-15T19:30:28.217-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.218-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "vacina" does not exist, skipping +2025-04-15T19:30:28.218-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.218-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamnese-pergunta" does not exist, skipping +2025-04-15T19:30:28.218-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.219-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamnese_historico" does not exist, skipping +2025-04-15T19:30:28.219-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.219-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamneses" does not exist, skipping +2025-04-15T19:30:28.219-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.219-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "animal" does not exist, skipping +2025-04-15T19:30:28.219-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.219-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "consulta" does not exist, skipping +2025-04-15T19:30:28.220-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.220-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "contato" does not exist, skipping +2025-04-15T19:30:28.220-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.220-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "endereco" does not exist, skipping +2025-04-15T19:30:28.220-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.220-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "exame_fisico" does not exist, skipping +2025-04-15T19:30:28.220-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.220-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "perguntas" does not exist, skipping +2025-04-15T19:30:28.221-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.221-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "tutor" does not exist, skipping +2025-04-15T19:30:28.221-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.221-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "usuario" does not exist, skipping +2025-04-15T19:30:28.221-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.222-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "vacina" does not exist, skipping +2025-04-15T19:30:28.222-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.222-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses_anamnese_perguntas" does not exist, skipping +2025-04-15T19:30:28.222-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.223-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses_anamnese_perguntas" does not exist, skipping +2025-04-15T19:30:28.223-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.223-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses_historico_progresso_medico" does not exist, skipping +2025-04-15T19:30:28.223-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.223-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses_historico_progresso_medico" does not exist, skipping +2025-04-15T19:30:28.224-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.224-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "token" does not exist, skipping +2025-04-15T19:30:28.224-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.224-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "tutor_contato" does not exist, skipping +2025-04-15T19:30:28.224-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.224-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "tutor_contato" does not exist, skipping +2025-04-15T19:30:28.225-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.225-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "tutor_endereco" does not exist, skipping +2025-04-15T19:30:28.225-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.225-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "tutor_endereco" does not exist, skipping +2025-04-15T19:30:28.226-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.226-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "usuario_consultas" does not exist, skipping +2025-04-15T19:30:28.226-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.226-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "usuario_consultas" does not exist, skipping +2025-04-15T19:30:28.226-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.226-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamneses_anamnese_perguntas" does not exist, skipping +2025-04-15T19:30:28.227-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.227-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamneses_historico_progresso_medico" does not exist, skipping +2025-04-15T19:30:28.227-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.227-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "token" does not exist, skipping +2025-04-15T19:30:28.227-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.227-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "tutor_contato" does not exist, skipping +2025-04-15T19:30:28.227-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.227-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "tutor_endereco" does not exist, skipping +2025-04-15T19:30:28.228-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.228-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "usuario_consultas" does not exist, skipping +2025-04-15T19:30:28.228-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:28.228-03:00 WARN 6517 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : sequence "token_seq" does not exist, skipping +2025-04-15T19:30:28.355-03:00 INFO 6517 --- [main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' +2025-04-15T19:30:28.575-03:00 INFO 6517 --- [main] o.s.d.j.r.query.QueryEnhancerFactory : Hibernate is in classpath; If applicable, HQL parser will be used. +2025-04-15T19:30:29.279-03:00 WARN 6517 --- [main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning +2025-04-15T19:30:29.348-03:00 INFO 6517 --- [main] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@2674c88f, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@b213994, org.springframework.security.web.context.SecurityContextHolderFilter@358260b6, org.springframework.security.web.header.HeaderWriterFilter@44c6e366, org.springframework.security.web.authentication.logout.LogoutFilter@2d34a88a, com.orbitech.npvet.oauth.jwt.JwtAuthenticationFilter@381c78ea, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@53b83e49, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@425cf933, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@70d2a981, org.springframework.security.web.access.ExceptionTranslationFilter@57e6fd09, org.springframework.security.web.access.intercept.AuthorizationFilter@3b92dd48] +2025-04-15T19:30:29.817-03:00 INFO 6517 --- [main] c.o.npvet.EntityTest.PerguntaTest : Started PerguntaTest in 3.366 seconds (process running for 4.09) +2025-04-15T19:30:30.062-03:00 INFO 6517 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.ExameFisicoTest]: ExameFisicoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:30.063-03:00 INFO 6517 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.ExameFisicoTest +2025-04-15T19:30:30.101-03:00 INFO 6517 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.AnimalDTOTest]: AnimalDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:30.106-03:00 INFO 6517 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.AnimalDTOTest +2025-04-15T19:30:30.125-03:00 INFO 6517 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.VacinaDTOTest]: VacinaDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:30.126-03:00 INFO 6517 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.VacinaDTOTest +2025-04-15T19:30:30.169-03:00 INFO 6517 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.VacinaTest]: VacinaTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:30.170-03:00 INFO 6517 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.VacinaTest +2025-04-15T19:30:30.185-03:00 INFO 6517 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.AnamneseTest]: AnamneseTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:30.186-03:00 INFO 6517 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.AnamneseTest +2025-04-15T19:30:30.196-03:00 INFO 6517 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.UsuarioTest]: UsuarioTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:30.197-03:00 INFO 6517 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.UsuarioTest +2025-04-15T19:30:30.204-03:00 INFO 6517 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.NpvetApplicationTests]: NpvetApplicationTests does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:30.206-03:00 INFO 6517 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.NpvetApplicationTests +2025-04-15T19:30:30.211-03:00 INFO 6517 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.UsuarioDtoTest]: UsuarioDtoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:30.212-03:00 INFO 6517 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.UsuarioDtoTest +2025-04-15T19:30:30.220-03:00 INFO 6517 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.TutorTest]: TutorTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:30.221-03:00 INFO 6517 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.TutorTest +2025-04-15T19:30:30.231-03:00 INFO 6517 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.AnamneseHistoricoTest]: AnamneseHistoricoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:30.232-03:00 INFO 6517 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.AnamneseHistoricoTest +2025-04-15T19:30:30.236-03:00 INFO 6517 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.ExameFisicoDTOTest]: ExameFisicoDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:30.236-03:00 INFO 6517 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.ExameFisicoDTOTest +2025-04-15T19:30:30.254-03:00 INFO 6517 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.ContatoTest]: ContatoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:30.255-03:00 INFO 6517 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.ContatoTest +2025-04-15T19:30:30.262-03:00 INFO 6517 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.AnimalTest]: AnimalTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:30.263-03:00 INFO 6517 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.AnimalTest +2025-04-15T19:30:30.274-03:00 INFO 6517 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.ContatoDTOTest]: ContatoDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:30.274-03:00 INFO 6517 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.ContatoDTOTest +2025-04-15T19:30:30.282-03:00 INFO 6517 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.EnderecoTest]: EnderecoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:30.284-03:00 INFO 6517 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.EnderecoTest +2025-04-15T19:30:30.296-03:00 INFO 6517 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.EnderecoDTOTest]: EnderecoDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:30.297-03:00 INFO 6517 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.EnderecoDTOTest +2025-04-15T19:30:30.308-03:00 INFO 6517 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.TutorDTOTest]: TutorDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:30:30.309-03:00 INFO 6517 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.TutorDTOTest +2025-04-15T19:30:30.323-03:00 INFO 6517 --- [SpringApplicationShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' +2025-04-15T19:30:30.338-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:30.338-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkryqhlmk35ogpp3jxx4rh68yk6 on table anamneses_anamnese_perguntas +2025-04-15T19:30:30.340-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:30.340-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkj180gtcsb792u2fk8bv1ritss on table anamneses_historico_progresso_medico +2025-04-15T19:30:30.343-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:30.343-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to 2 other objects +2025-04-15T19:30:30.346-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:30.346-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkooe7ghmjfibiiiaeumgu4lrr9 on table usuario_consultas +2025-04-15T19:30:30.348-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:30.348-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkp9adf0r99ppueo26leonkk3dj on table tutor_contato +2025-04-15T19:30:30.350-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:30.350-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkntx5ttgu7xkuccjc0upkfxvbg on table tutor_endereco +2025-04-15T19:30:30.354-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:30.354-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to 2 other objects +2025-04-15T19:30:30.356-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:30.356-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to 2 other objects +2025-04-15T19:30:30.358-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:30.359-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkryqhlmk35ogpp3jxx4rh68yk6" of relation "anamneses_anamnese_perguntas" does not exist, skipping +2025-04-15T19:30:30.359-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:30.360-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkn181obfnf7s68nnoj6r159a67" of relation "anamneses_anamnese_perguntas" does not exist, skipping +2025-04-15T19:30:30.361-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:30.361-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkj180gtcsb792u2fk8bv1ritss" of relation "anamneses_historico_progresso_medico" does not exist, skipping +2025-04-15T19:30:30.361-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:30.361-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fk2wdtp4d1fp3plwa1irevgxxth" of relation "anamneses_historico_progresso_medico" does not exist, skipping +2025-04-15T19:30:30.362-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:30.362-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fk5kj7c5g7y3kfcrm7bx8e30qod" of relation "token" does not exist, skipping +2025-04-15T19:30:30.363-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:30.363-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkp9adf0r99ppueo26leonkk3dj" of relation "tutor_contato" does not exist, skipping +2025-04-15T19:30:30.364-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:30.364-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkpkk8cikgtskg8dasw3tshtg02" of relation "tutor_contato" does not exist, skipping +2025-04-15T19:30:30.365-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:30.365-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkntx5ttgu7xkuccjc0upkfxvbg" of relation "tutor_endereco" does not exist, skipping +2025-04-15T19:30:30.366-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:30.366-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkpuwl7gfirj9402n0g37q50v98" of relation "tutor_endereco" does not exist, skipping +2025-04-15T19:30:30.367-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:30.367-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkooe7ghmjfibiiiaeumgu4lrr9" of relation "usuario_consultas" does not exist, skipping +2025-04-15T19:30:30.367-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:30:30.368-03:00 WARN 6517 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkbfa7h15o0v6bdi8cfhediah0i" of relation "usuario_consultas" does not exist, skipping +2025-04-15T19:30:30.377-03:00 INFO 6517 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... +2025-04-15T19:30:30.379-03:00 INFO 6517 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. diff --git a/src/test/java/com/orbitech/npvet/DTOTest/AnamneseDTOTest.java b/src/test/java/com/orbitech/npvet/DTOTest/AnamneseDTOTest.java new file mode 100644 index 0000000..db9b502 --- /dev/null +++ b/src/test/java/com/orbitech/npvet/DTOTest/AnamneseDTOTest.java @@ -0,0 +1,71 @@ +package com.orbitech.npvet.DTOTest; + +import com.orbitech.npvet.dto.*; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; + +import java.util.ArrayList; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; + +class AnamneseDTOTest { + + AnamneseDTO anamnese = new AnamneseDTO(); + AnimalDTO animal = new AnimalDTO(); + TutorDTO tutor = new TutorDTO(); + UsuarioDTO veterinario = new UsuarioDTO(); + AnamneseHistoricoDTO anamneseHistorico = new AnamneseHistoricoDTO(); + List anamneseHistoricos = new ArrayList<>(); + AnamnesePerguntaDTO anamnesePergunta = new AnamnesePerguntaDTO(); + List anamnesePerguntas = new ArrayList<>(); + @BeforeEach + void setUp(){ + + animal.setId(1L); + animal.setNome("Buddy"); + + tutor.setId(1L); + tutor.setCpf("123"); + + veterinario.setId("1L"); + veterinario.setNome("Dr. Smith"); + + anamneseHistorico.setId(1L); +// anamneseHistorico.setAnamnese(anamnese); + anamneseHistorico.setProgressoMedico("Medical Progress Sample One."); + + anamneseHistoricos.add(anamneseHistorico); + + anamnesePergunta.setId(1L); +// anamnesePergunta.setAnamneseDTO(anamnese); +// anamnesePergunta.setPerguntaDTO(new PerguntaDTO()); + + anamnesePerguntas.add(anamnesePergunta); + + anamnese.setId(1L); + anamnese.setAnimalDTO(animal); + anamnese.setTutorDTO(tutor); + anamnese.setVeterinarioDTO(veterinario); + anamnese.setHistoricoProgressoMedico(anamneseHistoricos); + + } + +// @Test +// void testAllArgsConstructor() { +// AnamneseDTO anamneseWithArgs = new AnamneseDTO(animal, tutor, veterinario, "queixaPrincipal", +// anamneseHistoricos, "alimentacao", "contactantes", +// "ambiente", "vacinacao", "vermifugacao", +// "sistemaRespiratorio", "sistemaCardiovascular", +// "sistemaUrinario", "sistemaReprodutor", "sistemaLocomotor", +// "sistemaNeurologico", "pele", "olhos", +// "ouvidos", anamnesePerguntas); +// assertNotNull(anamneseWithArgs); +// assertEquals(animal, anamneseWithArgs.getAnimalDTO()); +// assertEquals(tutor, anamneseWithArgs.getTutorDTO()); +// assertEquals(veterinario, anamneseWithArgs.getVeterinarioDTO()); +// assertEquals("queixaPrincipal", anamneseWithArgs.getQueixaPrincipal()); +// } + +} diff --git a/src/test/java/com/orbitech/npvet/DTOTest/AnimalDTOTest.java b/src/test/java/com/orbitech/npvet/DTOTest/AnimalDTOTest.java new file mode 100644 index 0000000..49f826a --- /dev/null +++ b/src/test/java/com/orbitech/npvet/DTOTest/AnimalDTOTest.java @@ -0,0 +1,64 @@ +package com.orbitech.npvet.DTOTest; + +import com.orbitech.npvet.dto.AnimalDTO; +import com.orbitech.npvet.dto.TutorDTO; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; +import static org.junit.jupiter.api.Assertions.assertEquals; + +@SpringBootTest +class AnimalDTOTest { + + private final AnimalDTO animalDTO = new AnimalDTO(); + private final TutorDTO tutorDTO = new TutorDTO(); + + + @BeforeEach + void setUp(){ + tutorDTO.setId(2L); + tutorDTO.setNome("Alice"); + tutorDTO.setCpf("123"); + + + animalDTO.setId(1L); + animalDTO.setNome("toto"); + animalDTO.setRaca("Cachorro"); + animalDTO.setEspecie("Cachorro"); + animalDTO.setIdade(10); + animalDTO.setPelagem("baixa"); + animalDTO.setProcedencia("Duvidosa"); + animalDTO.setPeso(10.50); + animalDTO.setTutorId(tutorDTO); + + } + + @Test + void animalIdTest(){assertEquals(1L, animalDTO.getId());} + + @Test + void animalNomeTest(){assertEquals("toto", animalDTO.getNome());} + + @Test + void animalRacaTest(){assertEquals("Cachorro", animalDTO.getRaca());} + + @Test + void animalEspecieTest(){assertEquals("Cachorro", animalDTO.getEspecie());} + + @Test + void animalIdadeTest(){assertEquals(10, animalDTO.getIdade());} + + @Test + void animalPelagemTest(){assertEquals("baixa", animalDTO.getPelagem());} + + @Test + void animalProcedenciaTest(){assertEquals("Duvidosa", animalDTO.getProcedencia());} + + @Test + void animalPesoTest(){assertEquals(10.50, animalDTO.getPeso());} + + @Test + void animalTutorTest(){assertEquals(tutorDTO, animalDTO.getTutorId());} + + +} diff --git a/src/test/java/com/orbitech/npvet/DTOTest/ContatoDTOTest.java b/src/test/java/com/orbitech/npvet/DTOTest/ContatoDTOTest.java new file mode 100644 index 0000000..18af944 --- /dev/null +++ b/src/test/java/com/orbitech/npvet/DTOTest/ContatoDTOTest.java @@ -0,0 +1,43 @@ +package com.orbitech.npvet.DTOTest; + +import com.orbitech.npvet.dto.ContatoDTO; +import com.orbitech.npvet.dto.TutorDTO; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +import java.util.ArrayList; +import java.util.List; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.junit.jupiter.api.Assertions.assertEquals; + +@SpringBootTest +class ContatoDTOTest { + private ContatoDTO contato = new ContatoDTO(); + private List tutores = new ArrayList<>(); + @BeforeEach + void setup(){ + tutores.add(new TutorDTO()); + contato.setId(1L); + contato.setTelefone("4599999999"); + contato.setTutores(tutores); + } + @Test + void contatoDtoGetIdTest(){ + assertEquals(1L, contato.getId()); + } + @Test + void contatoDtoGetTelefoneTest(){ + assertEquals("4599999999", contato.getTelefone()); + } + @Test + void contatoDtoGetTutoresTest(){ + assertThat(contato.getTutores()).usingRecursiveComparison().isEqualTo(tutores); + } + @Test + void contatoDtoAllArgsTest(){ + ContatoDTO tutorAllArgs = new ContatoDTO("4599999999", tutores); + assertThat(tutorAllArgs).usingRecursiveComparison().ignoringFields("id").isEqualTo(contato); + } +} diff --git a/src/test/java/com/orbitech/npvet/DTOTest/EnderecoDTOTest.java b/src/test/java/com/orbitech/npvet/DTOTest/EnderecoDTOTest.java new file mode 100644 index 0000000..3839a76 --- /dev/null +++ b/src/test/java/com/orbitech/npvet/DTOTest/EnderecoDTOTest.java @@ -0,0 +1,74 @@ +package com.orbitech.npvet.DTOTest; + +import com.orbitech.npvet.dto.EnderecoDTO; +import com.orbitech.npvet.dto.TutorDTO; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +import java.util.ArrayList; +import java.util.List; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.junit.jupiter.api.Assertions.assertEquals; + +@SpringBootTest +class EnderecoDTOTest { + private EnderecoDTO enderecoDTO = new EnderecoDTO(); + private List tutores = new ArrayList<>(); + @BeforeEach + void setup(){ + tutores.add(new TutorDTO()); + enderecoDTO.setId(1L); + enderecoDTO.setLogradouro("Logradouro"); + enderecoDTO.setCidade("Cidade"); + enderecoDTO.setEstado("Estado"); + enderecoDTO.setPais("Pais"); + enderecoDTO.setNumero("123"); + enderecoDTO.setCep("85851010"); + enderecoDTO.setComplemento("Complemento"); + enderecoDTO.setResidentes(tutores); + + } + @Test + void enderecoDtoGetIdTest(){ + assertEquals(1L, enderecoDTO.getId()); + } + @Test + void enderecoDtoGetLogradouroTest(){ + assertEquals("Logradouro", enderecoDTO.getLogradouro()); + } + @Test + void enderecoDtoGetCidadeTest(){ + assertEquals("Cidade", enderecoDTO.getCidade()); + } + @Test + void enderecoDtoGetEstadoTest(){ + assertEquals("Estado", enderecoDTO.getEstado()); + } + @Test + void enderecoDtoGetPaisTest(){ + assertEquals("Pais", enderecoDTO.getPais()); + } + @Test + void enderecoDtoGetNumeroTest(){ + assertEquals("123", enderecoDTO.getNumero()); + } + @Test + void enderecoDtoGetCepTest(){ + assertEquals("85851010", enderecoDTO.getCep()); + } + @Test + void enderecoDtoGetComplementoTest(){ + assertEquals("Complemento", enderecoDTO.getComplemento()); + } + @Test + void enderecoDtoGetResidentesTest(){ + assertThat(enderecoDTO.getResidentes()).usingRecursiveComparison().isEqualTo(tutores); + } +// @Test +// void enderecoDtoAllArgsTest(){ +//// EnderecoDTO enderecoAllArgs = new EnderecoDTO("Logradouro", "Cidade", "Estado", "Pais", "123", "85851010", "Complemento", tutores); +// assertThat(enderecoAllArgs).usingRecursiveComparison().ignoringFields("id").isEqualTo(enderecoDTO); +// } +} diff --git a/src/test/java/com/orbitech/npvet/DTOTest/ExameFisicoDTOTest.java b/src/test/java/com/orbitech/npvet/DTOTest/ExameFisicoDTOTest.java new file mode 100644 index 0000000..390be08 --- /dev/null +++ b/src/test/java/com/orbitech/npvet/DTOTest/ExameFisicoDTOTest.java @@ -0,0 +1,102 @@ +package com.orbitech.npvet.DTOTest; + +import com.orbitech.npvet.dto.AnimalDTO; +import com.orbitech.npvet.dto.ConsultaDTO; +import com.orbitech.npvet.dto.ExameFisicoDTO; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; +import java.time.LocalTime; +import static org.junit.jupiter.api.Assertions.assertEquals; + +@SpringBootTest +class ExameFisicoDTOTest { + + private final ExameFisicoDTO exameFisicoDTO = new ExameFisicoDTO(); + private final AnimalDTO animal = new AnimalDTO(); + private final ConsultaDTO consultaDTO = new ConsultaDTO(); + + @BeforeEach + void setUp() { + consultaDTO.setId(1L); + consultaDTO.setAnimal(animal); + + animal.setId(1L); + animal.setNome("toto"); + animal.setRaca("Cachorro"); + animal.setEspecie("Cachorro"); + + exameFisicoDTO.setAnimal(animal); + exameFisicoDTO.setNivelConsciencia("consiencia"); + exameFisicoDTO.setTemperaturaRetal(10.0); + exameFisicoDTO.setFrequenciaCardiaca(10.0); + exameFisicoDTO.setFrequenciaRespiratoria(10.0); + exameFisicoDTO.setTempoPreenchimentoCapilar(LocalTime.parse("08:20:45")); + exameFisicoDTO.setPulso(10.0); + exameFisicoDTO.setHidratacao("hidratacao"); + exameFisicoDTO.setLinfSubmand("linfSub"); + exameFisicoDTO.setLinfPreEscapulares("linfPre"); + exameFisicoDTO.setLinfPopliteos("linfPop"); + exameFisicoDTO.setLinfInguinais("linfIng"); + exameFisicoDTO.setMucosaOcular("mucosaOcular"); + exameFisicoDTO.setMucosaOral("mucosaOral"); + exameFisicoDTO.setMucosaPeniana("mucosaPeniana"); + exameFisicoDTO.setMucosaAnal("mucosaAnal"); + exameFisicoDTO.setPostura("postura"); + } + + @Test + void testPostura() { + assertEquals("postura", exameFisicoDTO.getPostura()); + } + + @Test + void testNivelConsciencia() { + assertEquals("consiencia", exameFisicoDTO.getNivelConsciencia()); + } + + @Test + void testTemperaturaRetal() { + assertEquals(10.0, exameFisicoDTO.getTemperaturaRetal()); + } + + @Test + void testFrequenciaCardiaca() { + assertEquals(10.0, exameFisicoDTO.getFrequenciaCardiaca()); + } + + @Test + void testFrequenciaRespiratoria() { + assertEquals(10.0, exameFisicoDTO.getFrequenciaRespiratoria()); + } + + @Test + void testTempoPreenchimentoCapilar() { + assertEquals(LocalTime.parse("08:20:45"), exameFisicoDTO.getTempoPreenchimentoCapilar()); + } + + @Test + void testPulso() { + assertEquals(10.0, exameFisicoDTO.getPulso()); + } + + @Test + void testHidratacao() { + assertEquals("hidratacao", exameFisicoDTO.getHidratacao()); + } + + @Test + void testLinfSubmand() { + assertEquals("linfSub", exameFisicoDTO.getLinfSubmand()); + } + + @Test + void testSetAnimal() { + assertEquals(animal, exameFisicoDTO.getAnimal()); + } + + @Test + void testSetPostura() { + assertEquals("postura", exameFisicoDTO.getPostura()); + } +} diff --git a/src/test/java/com/orbitech/npvet/DTOTest/TutorDTOTest.java b/src/test/java/com/orbitech/npvet/DTOTest/TutorDTOTest.java new file mode 100644 index 0000000..d7ffbdb --- /dev/null +++ b/src/test/java/com/orbitech/npvet/DTOTest/TutorDTOTest.java @@ -0,0 +1,78 @@ +package com.orbitech.npvet.DTOTest; + +import com.orbitech.npvet.dto.AnamneseDTO; +import com.orbitech.npvet.dto.ContatoDTO; +import com.orbitech.npvet.dto.EnderecoDTO; +import com.orbitech.npvet.dto.TutorDTO; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +import java.util.ArrayList; +import java.util.List; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.junit.jupiter.api.Assertions.assertEquals; + +@SpringBootTest +class TutorDTOTest { + private TutorDTO tutor = new TutorDTO(); + private List anamneseDTO = new ArrayList<>(); + private List enderecosDTO = new ArrayList<>(); + private List contatosDTO = new ArrayList<>(); + + @BeforeEach + void setup(){ + List enderecosDTO = new ArrayList<>(); + List contatosDTO = new ArrayList<>(); + tutor.setId(1L); + tutor.setNome("Nome"); + tutor.setCpf("446.460.100-62"); + tutor.setRg("11.011.455-9"); + tutor.setEmail("email@email.com"); + tutor.setAnamneses(anamneseDTO); + tutor.setEnderecos(enderecosDTO); + tutor.setTelefones(contatosDTO); + } + + @Test + void tutorDtoGetIdTest(){ + assertEquals(1L, tutor.getId()); + } + @Test + void tutorDtoGetNomeTest(){ + assertEquals("Nome", tutor.getNome()); + } + @Test + void tutorDtoGetCpfTest(){ + assertEquals("446.460.100-62", tutor.getCpf()); + } + @Test + void tutorDtoGetRgTest(){ + assertEquals("11.011.455-9", tutor.getRg()); + } + @Test + void tutorDtoGetEmailTest(){ + assertEquals("email@email.com", tutor.getEmail()); + } + @Test + void tutorDtoGetAnamnesesTest(){ + assertThat(tutor.getAnamneses()).usingRecursiveComparison().isEqualTo(anamneseDTO); + } + @Test + void tutorDtoGetEnderecosTest(){ + List enderecos = new ArrayList<>(); + assertThat(tutor.getEnderecos()).usingRecursiveComparison().isEqualTo(enderecos); + } + @Test + void tutorDtoGetTelefonesTest() { + List telefones = new ArrayList<>(); + assertThat(tutor.getTelefones()).usingRecursiveComparison().isEqualTo(telefones); + } +// @Test +// void tutorDtoAllArgsTest(){ +// TutorDTO tutorDTO = new TutorDTO("Nome", "446.460.100-62", "11.011.455-9", "email@email.com", anamneseDTO, contatosDTO, enderecosDTO); +// assertThat(tutorDTO).usingRecursiveComparison().ignoringFields("id").isEqualTo(tutor); +// } + +} diff --git a/src/test/java/com/orbitech/npvet/DTOTest/UsuarioDtoTest.java b/src/test/java/com/orbitech/npvet/DTOTest/UsuarioDtoTest.java new file mode 100644 index 0000000..bae72dc --- /dev/null +++ b/src/test/java/com/orbitech/npvet/DTOTest/UsuarioDtoTest.java @@ -0,0 +1,56 @@ +package com.orbitech.npvet.DTOTest; + +import com.orbitech.npvet.dto.UsuarioDTO; +import com.orbitech.npvet.entity.Role; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +@SpringBootTest + class UsuarioDtoTest { + + private UsuarioDTO usuarioDTO = new UsuarioDTO(); + + @BeforeEach + void setUp(){ + usuarioDTO.setRole(Role.SECRETARIA); + usuarioDTO.setNome("nome"); +// usuarioDTO.setSenha("senha"); + usuarioDTO.setId("1L"); + usuarioDTO.setUsername("username"); + usuarioDTO.setCpf("cpf"); + } + + @Test + void usuarioIdTest(){ + assertEquals("1L",usuarioDTO.getId()); + } + + @Test + void usuarioNomeTest(){ + assertEquals("nome",usuarioDTO.getNome()); + } + + @Test + void usuarioTipoTest(){ + assertEquals(Role.SECRETARIA,usuarioDTO.getRole()); + } + +// @Test +// void usuarioSenhaTest(){ +// assertEquals("senha",usuarioDTO.getSenha()); +// } + + @Test + void usuarioUsernameTest(){ + assertEquals("username",usuarioDTO.getUsername()); + } + + @Test + void usuarioCpfTest(){ + assertEquals("cpf",usuarioDTO.getCpf()); + } + +} diff --git a/src/test/java/com/orbitech/npvet/DTOTest/VacinaDTOTest.java b/src/test/java/com/orbitech/npvet/DTOTest/VacinaDTOTest.java new file mode 100644 index 0000000..102be86 --- /dev/null +++ b/src/test/java/com/orbitech/npvet/DTOTest/VacinaDTOTest.java @@ -0,0 +1,60 @@ +package com.orbitech.npvet.DTOTest; + +import com.orbitech.npvet.dto.AnimalDTO; +import com.orbitech.npvet.dto.VacinaDTO; +import com.orbitech.npvet.entity.Animal; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +import java.time.LocalDate; +import java.time.Month; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.junit.jupiter.api.Assertions.assertEquals; + +@SpringBootTest +class VacinaDTOTest { + private VacinaDTO vacinaDTO = new VacinaDTO(); + private LocalDate aplicacao = LocalDate.of(2023, Month.SEPTEMBER, 26); + + @BeforeEach + void setup() { + + vacinaDTO.setId(1L); + vacinaDTO.setNome("Vacina"); + vacinaDTO.setDescricao("Descricao"); + vacinaDTO.setDataAplicacao(aplicacao); + vacinaDTO.setDataRetorno(aplicacao); + vacinaDTO.setAnimal(new AnimalDTO()); + } + @Test + void vacinaIdTest(){ + assertEquals(1L, vacinaDTO.getId()); + } + @Test + void vacinaNomeTest(){ + assertEquals("Vacina", vacinaDTO.getNome()); + } + @Test + void vacinaDescricaoTest(){ + assertEquals("Descricao", vacinaDTO.getDescricao()); + } + @Test + void vacinaAplicacaoTest(){ + assertEquals(aplicacao, vacinaDTO.getDataAplicacao()); + } + @Test + void vacinaRetornoTest(){ + assertEquals(aplicacao, vacinaDTO.getDataRetorno()); + } + @Test + void vacinaAnimalTest(){ + assertThat(vacinaDTO.getAnimal()).usingRecursiveComparison().isEqualTo(new Animal()); + } + @Test + void vacinaAllArgsConstructorTest(){ + VacinaDTO vacinaAllArgs = new VacinaDTO("Vacina", aplicacao, aplicacao, "Descricao", new AnimalDTO()); + assertThat(vacinaAllArgs).usingRecursiveComparison().ignoringFields("id").isEqualTo(vacinaDTO); + } +} \ No newline at end of file diff --git a/src/test/java/com/orbitech/npvet/EntityTest/AnamneseHistoricoTest.java b/src/test/java/com/orbitech/npvet/EntityTest/AnamneseHistoricoTest.java new file mode 100644 index 0000000..a344740 --- /dev/null +++ b/src/test/java/com/orbitech/npvet/EntityTest/AnamneseHistoricoTest.java @@ -0,0 +1,56 @@ +package com.orbitech.npvet.EntityTest; + +import com.orbitech.npvet.entity.AnamneseHistorico; +import com.orbitech.npvet.entity.Anamnese; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +import java.time.LocalDate; + +import static org.junit.jupiter.api.Assertions.*; +@SpringBootTest +class AnamneseHistoricoTest { + +// @Test +// void testAllArgsConstructor() { +// Anamnese anamnese = new Anamnese(); +// anamnese.setId(1L); +// +// LocalDate dataAtualizacao = LocalDate.now(); +// String progressoMedico = "Test Progresso Medico"; +// +//// AnamneseHistorico anamneseHistorico = new AnamneseHistorico(anamnese, progressoMedico, dataAtualizacao); +// assertNotNull(anamneseHistorico); +//// assertEquals(anamnese, anamneseHistorico.getAnamnese()); +// assertEquals(progressoMedico, anamneseHistorico.getProgressoMedico()); +// assertEquals(dataAtualizacao, anamneseHistorico.getDataAtualizacao()); +// } + +// @Test +// void testAnamnese() { +// Anamnese anamnese = new Anamnese(); +// anamnese.setId(1L); +// +// AnamneseHistorico anamneseHistorico = new AnamneseHistorico(); +// anamneseHistorico.setAnamnese(anamnese); +// assertEquals(anamnese, anamneseHistorico.getAnamnese()); +// } + + @Test + void testProgressoMedico() { + AnamneseHistorico anamneseHistorico = new AnamneseHistorico(); + anamneseHistorico.setProgressoMedico("Test Progresso Medico"); + assertEquals("Test Progresso Medico", anamneseHistorico.getProgressoMedico()); + } + + @Test + void testDataAtualizacao() { + AnamneseHistorico anamneseHistorico = new AnamneseHistorico(); + assertNull(anamneseHistorico.getDataAtualizacao()); + + anamneseHistorico.prePersistDataAtualizacao(); + assertNotNull(anamneseHistorico.getDataAtualizacao()); + assertEquals(LocalDate.now(), anamneseHistorico.getDataAtualizacao()); + } +} diff --git a/src/test/java/com/orbitech/npvet/EntityTest/AnamnesePerguntaTest.java b/src/test/java/com/orbitech/npvet/EntityTest/AnamnesePerguntaTest.java new file mode 100644 index 0000000..1b6c97f --- /dev/null +++ b/src/test/java/com/orbitech/npvet/EntityTest/AnamnesePerguntaTest.java @@ -0,0 +1,63 @@ +package com.orbitech.npvet.EntityTest; + +import com.orbitech.npvet.entity.AnamnesePergunta; +import com.orbitech.npvet.entity.Anamnese; +import com.orbitech.npvet.entity.Pergunta; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +import static org.junit.jupiter.api.Assertions.*; + +@SpringBootTest +class AnamnesePerguntaTest { + + private AnamnesePergunta anamnesePergunta; + + @BeforeEach + void setUp() { + anamnesePergunta = new AnamnesePergunta(); + Anamnese anamnese = new Anamnese(); + Pergunta pergunta = new Pergunta(); + + anamnese.setId(1L); + pergunta.setId(1L); + +// anamnesePergunta.setAnamnese(anamnese); +// anamnesePergunta.setPergunta(pergunta); +// anamnesePergunta.setResposta("Test Resposta"); + } + +// @Test +// void testAllArgsConstructor() { +// Anamnese anamnese = new Anamnese(); +// Pergunta pergunta = new Pergunta(); +// +// anamnese.setId(1L); +// pergunta.setId(1L); +// +// AnamnesePergunta anamnesePerguntaWithArgs = new AnamnesePergunta(anamnese, pergunta, "Test Resposta"); +// assertNotNull(anamnesePerguntaWithArgs); +// assertEquals(1L, anamnesePerguntaWithArgs.getAnamnese().getId()); +// assertEquals(1L, anamnesePerguntaWithArgs.getPergunta().getId()); +// assertEquals("Test Resposta", anamnesePerguntaWithArgs.getResposta()); +// } + +// @Test +// void testAnamnese() { +// assertNotNull(anamnesePergunta.getAnamnese()); +// assertEquals(1L, anamnesePergunta.getAnamnese().getId()); +// } + +// @Test +// void testPergunta() { +// assertNotNull(anamnesePergunta.getPergunta()); +// assertEquals(1L, anamnesePergunta.getPergunta().getId()); +// } + +// @Test +// void testResposta() { +// assertEquals("Test Resposta", anamnesePergunta.getResposta()); +// } +} diff --git a/src/test/java/com/orbitech/npvet/EntityTest/AnamneseTest.java b/src/test/java/com/orbitech/npvet/EntityTest/AnamneseTest.java new file mode 100644 index 0000000..1554474 --- /dev/null +++ b/src/test/java/com/orbitech/npvet/EntityTest/AnamneseTest.java @@ -0,0 +1,137 @@ +package com.orbitech.npvet.EntityTest; + +import com.orbitech.npvet.entity.*; + +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +import java.util.ArrayList; +import java.util.List; + + +import static org.junit.jupiter.api.Assertions.*; +@SpringBootTest +class AnamneseTest { + + Anamnese anamnese = new Anamnese(); + Animal animal = new Animal(); + Tutor tutor = new Tutor(); + Usuario veterinario = new Usuario(); + AnamneseHistorico anamneseHistorico = new AnamneseHistorico(); + List anamneseHistoricos = new ArrayList<>(); + AnamnesePergunta anamnesePergunta = new AnamnesePergunta(); + List anamnesePerguntas = new ArrayList<>(); + @BeforeEach + void setUp(){ + + animal.setId(1L); + animal.setNome("Buddy"); + + tutor.setId(1L); + tutor.setCpf("123"); + + veterinario.setId(1L); + veterinario.setNome("Dr. Smith"); + + anamneseHistorico.setId(1L); +// anamneseHistorico.setAnamnese(anamnese); + anamneseHistorico.setProgressoMedico("Medical Progress Sample One."); + + anamneseHistoricos.add(anamneseHistorico); + + anamnesePergunta.setId(1L); +// anamnesePergunta.setAnamnese(anamnese); +// anamnesePergunta.setPergunta(new Pergunta()); + + anamnesePerguntas.add(anamnesePergunta); + + anamnese.setId(1L); + anamnese.setAnimal(animal); + anamnese.setTutor(tutor); + anamnese.setVeterinario(veterinario); + anamnese.setHistoricoProgressoMedico(anamneseHistoricos); + + } + +// @Test +// void testAllArgsConstructor() { +// Anamnese anamneseWithArgs = new Anamnese(animal, tutor, veterinario, "queixaPrincipal", +// anamneseHistoricos, "alimentacao", "contactantes", +// "ambiente", "vacinacao", "vermifugacao", +// "sistemaRespiratorio", "sistemaCardiovascular", +// "sistemaUrinario", "sistemaReprodutor", "sistemaLocomotor", +// "sistemaNeurologico", "pele", "olhos", +// "ouvidos", anamnesePerguntas); +// assertNotNull(anamneseWithArgs); +// assertEquals(animal, anamneseWithArgs.getAnimal()); +// assertEquals(tutor, anamneseWithArgs.getTutor()); +// assertEquals(veterinario, anamneseWithArgs.getVeterinario()); +// assertEquals("queixaPrincipal", anamneseWithArgs.getQueixaPrincipal()); +// } + + @Test + void testTutor() { + Tutor newTutor = new Tutor(); + newTutor.setId(2L); + newTutor.setCpf("456"); + anamnese.setTutor(newTutor); + assertEquals(newTutor, anamnese.getTutor()); + } + + @Test + void testVeterinario() { + Usuario newVeterinario = new Usuario(); + newVeterinario.setId(2L); + newVeterinario.setNome("Dr. Johnson"); + anamnese.setVeterinario(newVeterinario); + assertEquals(newVeterinario, anamnese.getVeterinario()); + } + + @Test + void testAnimal() { + Animal newAnimal = new Animal(); + newAnimal.setId(2L); + newAnimal.setNome("Fido"); + anamnese.setAnimal(newAnimal); + assertEquals(newAnimal, anamnese.getAnimal()); + } + + @Test + void testEqualsAndHashCode() { + Anamnese anamnese1 = new Anamnese(); + anamnese1.setId(1L); + Anamnese anamnese2 = new Anamnese(); + anamnese2.setId(1L); + + assertEquals(anamnese1, anamnese2); + assertEquals(anamnese1.hashCode(), anamnese2.hashCode()); + + Anamnese differentAnamnese = new Anamnese(); + differentAnamnese.setId(2L); + assertNotEquals(null, anamnese1); + } + + @Test + void testHistoricoProgressoMedico() { + List historicoProgressoMedico = new ArrayList<>(); + AnamneseHistorico historico1 = new AnamneseHistorico(); + AnamneseHistorico historico2 = new AnamneseHistorico(); + historicoProgressoMedico.add(historico1); + historicoProgressoMedico.add(historico2); + anamnese.setHistoricoProgressoMedico(historicoProgressoMedico); + assertEquals(historicoProgressoMedico, anamnese.getHistoricoProgressoMedico()); + } + + @Test + void testAnamnesePerguntas() { + List anamnesePerguntas = new ArrayList<>(); + AnamnesePergunta pergunta1 = new AnamnesePergunta(); + AnamnesePergunta pergunta2 = new AnamnesePergunta(); + anamnesePerguntas.add(pergunta1); + anamnesePerguntas.add(pergunta2); + anamnese.setAnamnesePerguntas(anamnesePerguntas); + assertEquals(anamnesePerguntas, anamnese.getAnamnesePerguntas()); + } + +} diff --git a/src/test/java/com/orbitech/npvet/EntityTest/AnimalTest.java b/src/test/java/com/orbitech/npvet/EntityTest/AnimalTest.java new file mode 100644 index 0000000..33e70c5 --- /dev/null +++ b/src/test/java/com/orbitech/npvet/EntityTest/AnimalTest.java @@ -0,0 +1,88 @@ +package com.orbitech.npvet.EntityTest; + +import com.orbitech.npvet.entity.*; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +import java.util.ArrayList; +import java.util.List; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.junit.jupiter.api.Assertions.assertEquals; + +@SpringBootTest +class AnimalTest { + + private Animal animal = new Animal(); + private Tutor tutor = new Tutor(); + + + @BeforeEach + void setUp(){ + List anamnese = new ArrayList<>(); + List consulta = new ArrayList<>(); + List vacina = new ArrayList<>(); + + + tutor.setId(2L); + tutor.setNome("Alice"); + tutor.setCpf("123"); + + + animal.setId(1L); + animal.setNome("nome"); + animal.setRaca("raca"); + animal.setEspecie("especie"); + animal.setIdade(11); + animal.setPelagem("pelagem"); + animal.setProcedencia("procedencia"); + animal.setPeso(10.50); + animal.setTutorId(tutor); + animal.setVacinas(vacina); + animal.setConsulta(consulta); + animal.setAnamneses(anamnese); + animal.setSexo(Sexo.MACHO); + + } + + @Test + void animalIdTest(){assertEquals(1L, animal.getId());} + + @Test + void animalNomeTest(){assertEquals("nome", animal.getNome());} + + @Test + void animalRacaTest(){assertEquals("raca", animal.getRaca());} + + @Test + void animalEspecieTest(){assertEquals("especie", animal.getEspecie());} + + @Test + void animalIdadeTest(){assertEquals(11, animal.getIdade());} + + @Test + void animalPelagemTest(){assertEquals("pelagem", animal.getPelagem());} + + @Test + void animalProcedenciaTest(){assertEquals("procedencia", animal.getProcedencia());} + + @Test + void animalPesoTest(){assertEquals(10.50, animal.getPeso());} + + @Test + void animalTutorTest(){assertEquals(tutor, animal.getTutorId());} + + @Test + void animalAllArgsConstructor(){ + List anamnese = new ArrayList<>(); + List consulta = new ArrayList<>(); + List vacina = new ArrayList<>(); + + Animal animalAllArgs = new Animal("nome", "especie", "raca", Sexo.MACHO, 11, 10.50, "pelagem", "procedencia", tutor, anamnese, consulta, vacina); + assertThat(animalAllArgs).usingRecursiveComparison().ignoringFields("id").isEqualTo(animal); + + + } + +} diff --git a/src/test/java/com/orbitech/npvet/EntityTest/ContatoTest.java b/src/test/java/com/orbitech/npvet/EntityTest/ContatoTest.java new file mode 100644 index 0000000..9af3a7c --- /dev/null +++ b/src/test/java/com/orbitech/npvet/EntityTest/ContatoTest.java @@ -0,0 +1,42 @@ +package com.orbitech.npvet.EntityTest; +import com.orbitech.npvet.entity.Contato; +import com.orbitech.npvet.entity.Tutor; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; +import java.util.ArrayList; +import java.util.List; +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.junit.jupiter.api.Assertions.assertEquals; + +@SpringBootTest +class ContatoTest { + private Contato contato = new Contato(); + private List tutores = new ArrayList<>(); + + + @BeforeEach + void setup(){ + tutores.add(new Tutor()); + contato.setId(1L); + contato.setTelefone("4599999999"); + contato.setTutores(tutores); + } + @Test + void contatoGetIdTest(){ + assertEquals(1L, contato.getId()); + } + @Test + void contatoGetTelefoneTest(){ + assertEquals("4599999999", contato.getTelefone()); + } + @Test + void contatoGetTutoresTest(){ + assertThat(contato.getTutores()).usingRecursiveComparison().isEqualTo(tutores); + } + @Test + void contatoAllArgsTest(){ + Contato tutorAllArgs = new Contato("4599999999", tutores); + assertThat(tutorAllArgs).usingRecursiveComparison().ignoringFields("id").isEqualTo(contato); + } +} diff --git a/src/test/java/com/orbitech/npvet/EntityTest/EnderecoTest.java b/src/test/java/com/orbitech/npvet/EntityTest/EnderecoTest.java new file mode 100644 index 0000000..fbb236c --- /dev/null +++ b/src/test/java/com/orbitech/npvet/EntityTest/EnderecoTest.java @@ -0,0 +1,74 @@ +package com.orbitech.npvet.EntityTest; + +import com.orbitech.npvet.entity.Endereco; +import com.orbitech.npvet.entity.Tutor; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +import java.util.ArrayList; +import java.util.List; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.junit.jupiter.api.Assertions.assertEquals; + +@SpringBootTest +class EnderecoTest { + private Endereco endereco = new Endereco(); + private List tutores = new ArrayList<>(); + @BeforeEach + void setup(){ + tutores.add(new Tutor()); + endereco.setId(1L); + endereco.setLogradouro("Logradouro"); + endereco.setCidade("Cidade"); + endereco.setEstado("Estado"); + endereco.setPais("Pais"); + endereco.setNumero("123"); + endereco.setCep("85851010"); + endereco.setComplemento("Complemento"); + endereco.setResidentes(tutores); + + } + @Test + void enderecoDtoGetIdTest(){ + assertEquals(1L, endereco.getId()); + } + @Test + void enderecoDtoGetLogradouroTest(){ + assertEquals("Logradouro", endereco.getLogradouro()); + } + @Test + void enderecoDtoGetCidadeTest(){ + assertEquals("Cidade", endereco.getCidade()); + } + @Test + void enderecoDtoGetEstadoTest(){ + assertEquals("Estado", endereco.getEstado()); + } + @Test + void enderecoDtoGetPaisTest(){ + assertEquals("Pais", endereco.getPais()); + } + @Test + void enderecoDtoGetNumeroTest(){ + assertEquals("123", endereco.getNumero()); + } + @Test + void enderecoDtoGetCepTest(){ + assertEquals("85851010", endereco.getCep()); + } + @Test + void enderecoDtoGetComplementoTest(){ + assertEquals("Complemento", endereco.getComplemento()); + } + @Test + void enderecoDtoGetResidentesTest(){ + assertThat(endereco.getResidentes()).usingRecursiveComparison().isEqualTo(tutores); + } +// @Test +// void enderecoDtoAllArgsTest(){ +// Endereco enderecoAllArgs = new Endereco("Logradouro", "Cidade", "Estado", "Pais", "123", "85851010", "Complemento", tutores); +// assertThat(enderecoAllArgs).usingRecursiveComparison().ignoringFields("id").isEqualTo(endereco); +// } +} diff --git a/src/test/java/com/orbitech/npvet/EntityTest/ExameFisicoTest.java b/src/test/java/com/orbitech/npvet/EntityTest/ExameFisicoTest.java new file mode 100644 index 0000000..0925644 --- /dev/null +++ b/src/test/java/com/orbitech/npvet/EntityTest/ExameFisicoTest.java @@ -0,0 +1,124 @@ +package com.orbitech.npvet.EntityTest; + +import com.orbitech.npvet.entity.Animal; +import com.orbitech.npvet.entity.Consulta; +import com.orbitech.npvet.entity.ExameFisico; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; +import java.time.LocalTime; +import static org.junit.jupiter.api.Assertions.assertEquals; + +@SpringBootTest +class ExameFisicoTest { + + private final ExameFisico exameFisico = new ExameFisico(); + private final Animal animal = new Animal(); + private final Consulta consulta= new Consulta(); + @BeforeEach + void setUp() { + + consulta.setId(1L); + consulta.setAnimal(animal); + + + animal.setId(1L); + animal.setNome("toto"); + animal.setRaca("Cachorro"); + animal.setEspecie("Cachorro"); + + exameFisico.setAnimal(animal); + exameFisico.setNivelConsciencia("consiencia"); + exameFisico.setTemperaturaRetal(10.0); + exameFisico.setFrequenciaCardiaca(10.0); + exameFisico.setFrequenciaRespiratoria(10.0); + exameFisico.setTempoPreenchimentoCapilar(LocalTime.parse("08:20:45")); + exameFisico.setPulso(10.0); + exameFisico.setHidratacao("hidratacao"); + exameFisico.setLinfSubmand("linfSub"); + exameFisico.setLinfPreEscapulares("linfPre"); + exameFisico.setLinfPopliteos("linfPop"); + exameFisico.setLinfInguinais("linfIng"); + exameFisico.setMucosaOcular("mucosaOcular"); + exameFisico.setMucosaOral("mucosaOral"); + exameFisico.setMucosaPeniana("mucosaPeniana"); + exameFisico.setMucosaAnal("mucosaAnal"); + exameFisico.setAnimal(animal); + exameFisico.setConsulta(consulta); + exameFisico.setPostura("postura"); + + } + + @Test + void testPostura(){assertEquals("postura", exameFisico.getPostura());} + + @Test + void testNivelConsciencia(){assertEquals("consiencia", exameFisico.getNivelConsciencia());} + + @Test + void testTemperaturaRetal(){assertEquals(10.0, exameFisico.getTemperaturaRetal());} + + @Test + void testFrequenciaCardiaca(){assertEquals(10.0, exameFisico.getFrequenciaCardiaca());} + + @Test + void testFrequenciaRespiratoria(){assertEquals(10.0, exameFisico.getFrequenciaRespiratoria());} + + @Test + void testTempoPreenchimentoCapilar(){assertEquals(LocalTime.parse("08:20:45"), exameFisico.getTempoPreenchimentoCapilar());} + + @Test + void testPulso(){assertEquals(10.0, exameFisico.getPulso());} + + @Test + void testHidratacao(){assertEquals("hidratacao", exameFisico.getHidratacao());} + + @Test + void testLinfSubmand(){assertEquals("linfSub", exameFisico.getLinfSubmand());} + + @Test + void testLinfPreEscapulares() { + assertEquals("linfPre", exameFisico.getLinfPreEscapulares()); + } + + @Test + void testLinfPopliteos() { + assertEquals("linfPop", exameFisico.getLinfPopliteos()); + } + + @Test + void testLinfInguinais() { + assertEquals("linfIng", exameFisico.getLinfInguinais()); + } + + @Test + void testMucosaOcular() { + assertEquals("mucosaOcular", exameFisico.getMucosaOcular()); + } + + @Test + void testMucosaOral() { + assertEquals("mucosaOral", exameFisico.getMucosaOral()); + } + + @Test + void testMucosaPeniana() { + assertEquals("mucosaPeniana", exameFisico.getMucosaPeniana()); + } + + @Test + void testMucosaAnal() { + assertEquals("mucosaAnal", exameFisico.getMucosaAnal()); + } + + @Test + void testAnimal() { + assertEquals(animal, exameFisico.getAnimal()); + } + + @Test + void testConsulta() { + assertEquals(consulta, exameFisico.getConsulta()); + } + +} diff --git a/src/test/java/com/orbitech/npvet/EntityTest/PerguntaTest.java b/src/test/java/com/orbitech/npvet/EntityTest/PerguntaTest.java new file mode 100644 index 0000000..75016c5 --- /dev/null +++ b/src/test/java/com/orbitech/npvet/EntityTest/PerguntaTest.java @@ -0,0 +1,69 @@ +package com.orbitech.npvet.EntityTest; + +import com.orbitech.npvet.entity.AnamnesePergunta; +import com.orbitech.npvet.entity.Pergunta; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +import java.util.ArrayList; +import java.util.List; + +import static org.junit.jupiter.api.Assertions.*; +@SpringBootTest +class PerguntaTest { + + private Pergunta pergunta; + + List anamnesePerguntas = new ArrayList<>(); + + + @BeforeEach + void setUp() { + pergunta = new Pergunta(); + pergunta.setEnunciado("Test Enunciado"); + + + AnamnesePergunta anamnese1 = new AnamnesePergunta(); + AnamnesePergunta anamnese2 = new AnamnesePergunta(); + + anamnesePerguntas.add(anamnese1); + anamnesePerguntas.add(anamnese2); + + } + + @Test + void testSetAndGetEnunciado() { + String enunciado = "Test Enunciado"; + pergunta.setEnunciado(enunciado); + assertEquals(enunciado, pergunta.getEnunciado()); + } + +// @Test +// void testAnamnesePerguntas() { +// pergunta.setAnamnesePerguntas(anamnesePerguntas); +// assertEquals(anamnesePerguntas, pergunta.getAnamnesePerguntas()); +// } + + @Test + void testNoArgsConstructor() { + assertNotNull(pergunta); + } + +// @Test +// void testAllArgsConstructor() { +// Pergunta perguntaWithArgs = new Pergunta(anamnesePerguntas,"Test Enunciado"); +// assertNotNull(perguntaWithArgs); +// assertEquals("Test Enunciado", perguntaWithArgs.getEnunciado()); +// } + + @Test + void testPerguntaConstructor() { + String enunciado = "Test Enunciado"; + Pergunta pergunta = new Pergunta(enunciado); + assertNotNull(pergunta); + assertEquals(enunciado, pergunta.getEnunciado()); + } + + +} diff --git a/src/test/java/com/orbitech/npvet/EntityTest/TutorTest.java b/src/test/java/com/orbitech/npvet/EntityTest/TutorTest.java new file mode 100644 index 0000000..dc9b59d --- /dev/null +++ b/src/test/java/com/orbitech/npvet/EntityTest/TutorTest.java @@ -0,0 +1,73 @@ +package com.orbitech.npvet.EntityTest; + +import com.orbitech.npvet.entity.Anamnese; +import com.orbitech.npvet.entity.Contato; +import com.orbitech.npvet.entity.Endereco; +import com.orbitech.npvet.entity.Tutor; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +import java.util.ArrayList; +import java.util.List; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.junit.jupiter.api.Assertions.assertEquals; + +@SpringBootTest +class TutorTest { + private Tutor tutor = new Tutor(); + private List enderecos = new ArrayList<>(); + private List contatos = new ArrayList<>(); + private List anamneses = new ArrayList<>(); + @BeforeEach + void setup(){ + tutor.setId(1L); + tutor.setNome("Nome"); + tutor.setCpf("446.460.100-62"); + tutor.setRg("11.011.455-9"); + tutor.setEmail("email@email.com"); + tutor.setAnamneses(anamneses); + tutor.setEnderecos(enderecos); + tutor.setTelefones(contatos); + } + + @Test + void tutorGetIdTest(){ + assertEquals(1L, tutor.getId()); + } + @Test + void tutorGetNomeTest(){ + assertEquals("Nome", tutor.getNome()); + } + @Test + void tutorGetCpfTest(){ + assertEquals("446.460.100-62", tutor.getCpf()); + } + @Test + void tutorGetRgTest(){ + assertEquals("11.011.455-9", tutor.getRg()); + } + @Test + void tutorGetEmailTest(){ + assertEquals("email@email.com", tutor.getEmail()); + } + @Test + void tutorGetEnderecosTest(){ + assertThat(tutor.getEnderecos()).usingRecursiveComparison().isEqualTo(enderecos); + } + @Test + void tutorGetAnamnesesTest(){ + assertThat(tutor.getAnamneses()).usingRecursiveComparison().isEqualTo(anamneses); + } + @Test + void tutorGetTelefonesTest() { + assertThat(tutor.getTelefones()).usingRecursiveComparison().isEqualTo(contatos); + } +// @Test +// void tutorAllArgsTest(){ +// Tutor tutorAllArgs = new Tutor("Nome", "446.460.100-62", "11.011.455-9", "email@email.com", anamneses, contatos, enderecos); +// assertThat(tutorAllArgs).usingRecursiveComparison().ignoringFields("id").isEqualTo(tutor); +// } + +} diff --git a/src/test/java/com/orbitech/npvet/EntityTest/UsuarioTest.java b/src/test/java/com/orbitech/npvet/EntityTest/UsuarioTest.java new file mode 100644 index 0000000..2498e4e --- /dev/null +++ b/src/test/java/com/orbitech/npvet/EntityTest/UsuarioTest.java @@ -0,0 +1,56 @@ +package com.orbitech.npvet.EntityTest; + +import com.orbitech.npvet.entity.Role; +import com.orbitech.npvet.entity.Usuario; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +@SpringBootTest +class UsuarioTest { + + Usuario usuario = new Usuario(); + + @BeforeEach + void setUp(){ + usuario.setRole(Role.SECRETARIA); + usuario.setNome("nome"); +// usuario.setSenha("senha"); + usuario.setId(1L); + usuario.setUsername("username"); + usuario.setCpf("cpf"); + } + + @Test + void usuarioIdTest(){ + assertEquals(1L,usuario.getId()); + } + + @Test + void usuarioNomeTest(){ + assertEquals("nome",usuario.getNome()); + } + + @Test + void usuarioTipoTest(){ + assertEquals(Role.SECRETARIA,usuario.getRole()); + } + +// @Test +// void usuarioSenhaTest(){ +// assertEquals("senha",usuario.getSenha()); +// } + + @Test + void usuarioUsernameTest(){ + assertEquals("username",usuario.getUsername()); + } + + @Test + void usuarioCpfTest(){ + assertEquals("cpf",usuario.getCpf()); + } + +} diff --git a/src/test/java/com/orbitech/npvet/EntityTest/VacinaTest.java b/src/test/java/com/orbitech/npvet/EntityTest/VacinaTest.java new file mode 100644 index 0000000..f33f789 --- /dev/null +++ b/src/test/java/com/orbitech/npvet/EntityTest/VacinaTest.java @@ -0,0 +1,58 @@ +package com.orbitech.npvet.EntityTest; + +import com.orbitech.npvet.entity.Animal; +import com.orbitech.npvet.entity.Vacina; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +import java.time.LocalDate; +import java.time.Month; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; +import static org.junit.jupiter.api.Assertions.assertEquals; + +@SpringBootTest +class VacinaTest { + private Vacina vacina = new Vacina(); + private LocalDate aplicacao = LocalDate.of(2023, Month.SEPTEMBER, 26); + @BeforeEach + void setup() { + + vacina.setId(1L); + vacina.setNome("Vacina"); + vacina.setDescricao("Descricao"); + vacina.setDataAplicacao(aplicacao); + vacina.setDataRetorno(aplicacao); + vacina.setAnimal(new Animal()); + } + @Test + void vacinaIdTest(){ + assertEquals(1L, vacina.getId()); + } + @Test + void vacinaNomeTest(){ + assertEquals("Vacina", vacina.getNome()); + } + @Test + void vacinaDescricaoTest(){ + assertEquals("Descricao", vacina.getDescricao()); + } + @Test + void vacinaAplicacaoTest(){ + assertEquals(aplicacao, vacina.getDataAplicacao()); + } + @Test + void vacinaRetornoTest(){ + assertEquals(aplicacao, vacina.getDataRetorno()); + } + @Test + void vacinaAnimalTest(){ + assertThat(vacina.getAnimal()).usingRecursiveComparison().isEqualTo(new Animal()); + } + @Test + void vacinaAllArgsConstructorTest(){ + Vacina vacinaAllArgs = new Vacina("Vacina", aplicacao, aplicacao, "Descricao", new Animal()); + assertThat(vacinaAllArgs).usingRecursiveComparison().ignoringFields("id").isEqualTo(vacina); + } +} \ No newline at end of file diff --git a/src/test/java/com/orbitech/npvet/NpvetApplicationTests.java b/src/test/java/com/orbitech/npvet/NpvetApplicationTests.java new file mode 100644 index 0000000..091bbe8 --- /dev/null +++ b/src/test/java/com/orbitech/npvet/NpvetApplicationTests.java @@ -0,0 +1,17 @@ +package com.orbitech.npvet; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.context.ApplicationContext; + +import static org.assertj.core.api.AssertionsForClassTypes.assertThat; + +@SpringBootTest +class NpvetApplicationTests { + + @Test + void contextLoads(ApplicationContext context) { + assertThat(context).isNotNull(); + } + +} \ No newline at end of file From b9ba857620ae3b4f807676ed3405fe83f4b7b1fd Mon Sep 17 00:00:00 2001 From: Piegat Date: Tue, 15 Apr 2025 19:37:44 -0300 Subject: [PATCH 17/29] Corrigido bug no passwordEncoder --- .../java/com/orbitech/npvet/service/UsuarioService.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/orbitech/npvet/service/UsuarioService.java b/src/main/java/com/orbitech/npvet/service/UsuarioService.java index 07b0b67..0e230eb 100644 --- a/src/main/java/com/orbitech/npvet/service/UsuarioService.java +++ b/src/main/java/com/orbitech/npvet/service/UsuarioService.java @@ -5,6 +5,8 @@ import com.orbitech.npvet.entity.Role; import com.orbitech.npvet.entity.Usuario; import com.orbitech.npvet.repository.UsuarioRepository; +import lombok.AllArgsConstructor; +import lombok.NoArgsConstructor; import lombok.extern.log4j.Log4j2; import lombok.extern.slf4j.Slf4j; import org.modelmapper.ModelMapper; @@ -18,11 +20,12 @@ @Service @Slf4j +@AllArgsConstructor public class UsuarioService { @Autowired private UsuarioRepository repository; - private PasswordEncoder passwordEncoder; + private final PasswordEncoder passwordEncoder; private final ModelMapper mapper = new ModelMapper(); @@ -60,7 +63,7 @@ public UsuarioDTO create(UsuarioCadastrarDTO usuarioCadastrarDTO, Usuario usuari String encodedPassword = passwordEncoder.encode(usuarioCadastrarDTO.getPassword()); - usuarioAutenticado.setPassword(encodedPassword); + usuarioCadastrarDTO.setPassword(encodedPassword); Usuario usuarioByCpf = repository.findUsuarioByCpf(usuarioCadastrarDTO.getCpf()); From 85b81c6f487a2e9f9d70954c472e3aa1dbaf06f7 Mon Sep 17 00:00:00 2001 From: gustavoemf Date: Tue, 15 Apr 2025 19:44:13 -0300 Subject: [PATCH 18/29] =?UTF-8?q?Pull=20de=20altera=C3=A7=C3=B5es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- logs.log | 176 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 176 insertions(+) diff --git a/logs.log b/logs.log index 1ed4625..d113c8a 100644 --- a/logs.log +++ b/logs.log @@ -391,3 +391,179 @@ org.springframework.security.core.userdetails.UsernameNotFoundException: User no 2025-04-15T17:27:32.676-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkbfa7h15o0v6bdi8cfhediah0i" da relação "usuario_consultas" não existe, ignorando 2025-04-15T17:27:32.701-03:00 INFO 14724 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... 2025-04-15T17:27:32.706-03:00 INFO 14724 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. +2025-04-15T19:39:40.888-03:00 INFO 7427 --- [main] c.o.npvet.EntityTest.PerguntaTest : Starting PerguntaTest using Java 17.0.14 with PID 7427 (started by gustavo_parquetec in /home/gustavo_parquetec/Documentos/faculdade/NPVet-Backend-Cloud) +2025-04-15T19:39:40.889-03:00 INFO 7427 --- [main] c.o.npvet.EntityTest.PerguntaTest : No active profile set, falling back to 1 default profile: "default" +2025-04-15T19:39:41.221-03:00 INFO 7427 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. +2025-04-15T19:39:41.258-03:00 INFO 7427 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 33 ms. Found 11 JPA repository interfaces. +2025-04-15T19:39:41.551-03:00 INFO 7427 --- [main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] +2025-04-15T19:39:41.577-03:00 INFO 7427 --- [main] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.2.7.Final +2025-04-15T19:39:41.578-03:00 INFO 7427 --- [main] org.hibernate.cfg.Environment : HHH000406: Using bytecode reflection optimizer +2025-04-15T19:39:41.641-03:00 INFO 7427 --- [main] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy +2025-04-15T19:39:41.702-03:00 INFO 7427 --- [main] o.s.o.j.p.SpringPersistenceUnitInfo : No LoadTimeWeaver setup: ignoring JPA class transformer +2025-04-15T19:39:41.720-03:00 INFO 7427 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... +2025-04-15T19:39:41.829-03:00 INFO 7427 --- [main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@bd4ee01 +2025-04-15T19:39:41.830-03:00 INFO 7427 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. +2025-04-15T19:39:42.016-03:00 INFO 7427 --- [main] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy +2025-04-15T19:39:42.517-03:00 INFO 7427 --- [main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] +2025-04-15T19:39:42.526-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.527-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses" does not exist, skipping +2025-04-15T19:39:42.527-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.527-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses" does not exist, skipping +2025-04-15T19:39:42.528-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.528-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses" does not exist, skipping +2025-04-15T19:39:42.528-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.528-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "animal" does not exist, skipping +2025-04-15T19:39:42.528-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.528-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "consulta" does not exist, skipping +2025-04-15T19:39:42.529-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.529-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "consulta" does not exist, skipping +2025-04-15T19:39:42.529-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.529-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "consulta" does not exist, skipping +2025-04-15T19:39:42.529-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.529-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "consulta" does not exist, skipping +2025-04-15T19:39:42.530-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.530-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "exame_fisico" does not exist, skipping +2025-04-15T19:39:42.530-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.530-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "exame_fisico" does not exist, skipping +2025-04-15T19:39:42.530-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.530-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "vacina" does not exist, skipping +2025-04-15T19:39:42.530-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.531-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamnese-pergunta" does not exist, skipping +2025-04-15T19:39:42.531-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.531-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamnese_historico" does not exist, skipping +2025-04-15T19:39:42.531-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.531-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamneses" does not exist, skipping +2025-04-15T19:39:42.531-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.532-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "animal" does not exist, skipping +2025-04-15T19:39:42.532-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.532-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "consulta" does not exist, skipping +2025-04-15T19:39:42.532-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.532-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "contato" does not exist, skipping +2025-04-15T19:39:42.532-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.532-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "endereco" does not exist, skipping +2025-04-15T19:39:42.532-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.532-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "exame_fisico" does not exist, skipping +2025-04-15T19:39:42.533-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.533-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "perguntas" does not exist, skipping +2025-04-15T19:39:42.533-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.533-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "tutor" does not exist, skipping +2025-04-15T19:39:42.533-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.533-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "usuario" does not exist, skipping +2025-04-15T19:39:42.533-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.533-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "vacina" does not exist, skipping +2025-04-15T19:39:42.533-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.533-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses_anamnese_perguntas" does not exist, skipping +2025-04-15T19:39:42.534-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.534-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses_anamnese_perguntas" does not exist, skipping +2025-04-15T19:39:42.534-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.534-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses_historico_progresso_medico" does not exist, skipping +2025-04-15T19:39:42.534-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.534-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses_historico_progresso_medico" does not exist, skipping +2025-04-15T19:39:42.535-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.535-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "token" does not exist, skipping +2025-04-15T19:39:42.535-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.535-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "tutor_contato" does not exist, skipping +2025-04-15T19:39:42.535-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.535-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "tutor_contato" does not exist, skipping +2025-04-15T19:39:42.535-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.535-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "tutor_endereco" does not exist, skipping +2025-04-15T19:39:42.536-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.536-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "tutor_endereco" does not exist, skipping +2025-04-15T19:39:42.536-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.536-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "usuario_consultas" does not exist, skipping +2025-04-15T19:39:42.536-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.536-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "usuario_consultas" does not exist, skipping +2025-04-15T19:39:42.536-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.536-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamneses_anamnese_perguntas" does not exist, skipping +2025-04-15T19:39:42.536-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.537-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamneses_historico_progresso_medico" does not exist, skipping +2025-04-15T19:39:42.537-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.537-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "token" does not exist, skipping +2025-04-15T19:39:42.537-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.537-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "tutor_contato" does not exist, skipping +2025-04-15T19:39:42.537-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.537-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "tutor_endereco" does not exist, skipping +2025-04-15T19:39:42.537-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.537-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "usuario_consultas" does not exist, skipping +2025-04-15T19:39:42.538-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:42.538-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : sequence "token_seq" does not exist, skipping +2025-04-15T19:39:42.659-03:00 INFO 7427 --- [main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' +2025-04-15T19:39:42.896-03:00 INFO 7427 --- [main] o.s.d.j.r.query.QueryEnhancerFactory : Hibernate is in classpath; If applicable, HQL parser will be used. +2025-04-15T19:39:43.545-03:00 WARN 7427 --- [main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning +2025-04-15T19:39:43.604-03:00 INFO 7427 --- [main] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@738b34af, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@67108db4, org.springframework.security.web.context.SecurityContextHolderFilter@4afd8f16, org.springframework.security.web.header.HeaderWriterFilter@1c09a369, org.springframework.security.web.authentication.logout.LogoutFilter@40a43556, com.orbitech.npvet.oauth.jwt.JwtAuthenticationFilter@38db8089, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@52971afb, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@637798b4, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@5eab3eac, org.springframework.security.web.access.ExceptionTranslationFilter@48405f04, org.springframework.security.web.access.intercept.AuthorizationFilter@7d4d3842] +2025-04-15T19:39:43.990-03:00 INFO 7427 --- [main] c.o.npvet.EntityTest.PerguntaTest : Started PerguntaTest in 3.236 seconds (process running for 3.873) +2025-04-15T19:39:44.232-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.ExameFisicoTest]: ExameFisicoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:39:44.233-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.ExameFisicoTest +2025-04-15T19:39:44.281-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.AnimalDTOTest]: AnimalDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:39:44.286-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.AnimalDTOTest +2025-04-15T19:39:44.300-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.VacinaDTOTest]: VacinaDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:39:44.301-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.VacinaDTOTest +2025-04-15T19:39:44.344-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.VacinaTest]: VacinaTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:39:44.345-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.VacinaTest +2025-04-15T19:39:44.359-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.AnamneseTest]: AnamneseTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:39:44.360-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.AnamneseTest +2025-04-15T19:39:44.371-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.UsuarioTest]: UsuarioTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:39:44.371-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.UsuarioTest +2025-04-15T19:39:44.379-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.NpvetApplicationTests]: NpvetApplicationTests does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:39:44.381-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.NpvetApplicationTests +2025-04-15T19:39:44.386-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.UsuarioDtoTest]: UsuarioDtoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:39:44.387-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.UsuarioDtoTest +2025-04-15T19:39:44.393-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.TutorTest]: TutorTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:39:44.394-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.TutorTest +2025-04-15T19:39:44.404-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.AnamneseHistoricoTest]: AnamneseHistoricoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:39:44.405-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.AnamneseHistoricoTest +2025-04-15T19:39:44.412-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.ExameFisicoDTOTest]: ExameFisicoDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:39:44.413-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.ExameFisicoDTOTest +2025-04-15T19:39:44.428-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.ContatoTest]: ContatoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:39:44.433-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.ContatoTest +2025-04-15T19:39:44.440-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.AnimalTest]: AnimalTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:39:44.441-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.AnimalTest +2025-04-15T19:39:44.455-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.ContatoDTOTest]: ContatoDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:39:44.457-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.ContatoDTOTest +2025-04-15T19:39:44.464-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.EnderecoTest]: EnderecoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:39:44.466-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.EnderecoTest +2025-04-15T19:39:44.478-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.EnderecoDTOTest]: EnderecoDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:39:44.479-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.EnderecoDTOTest +2025-04-15T19:39:44.489-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.TutorDTOTest]: TutorDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. +2025-04-15T19:39:44.489-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.TutorDTOTest +2025-04-15T19:39:44.502-03:00 INFO 7427 --- [SpringApplicationShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' +2025-04-15T19:39:44.517-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:44.517-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkryqhlmk35ogpp3jxx4rh68yk6 on table anamneses_anamnese_perguntas +2025-04-15T19:39:44.519-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:44.519-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkj180gtcsb792u2fk8bv1ritss on table anamneses_historico_progresso_medico +2025-04-15T19:39:44.521-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:44.522-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to 2 other objects +2025-04-15T19:39:44.525-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:44.525-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkooe7ghmjfibiiiaeumgu4lrr9 on table usuario_consultas +2025-04-15T19:39:44.526-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:44.526-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkp9adf0r99ppueo26leonkk3dj on table tutor_contato +2025-04-15T19:39:44.528-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:44.528-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkntx5ttgu7xkuccjc0upkfxvbg on table tutor_endereco +2025-04-15T19:39:44.532-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:44.532-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to 2 other objects +2025-04-15T19:39:44.534-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:44.534-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to 2 other objects +2025-04-15T19:39:44.536-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:44.536-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkryqhlmk35ogpp3jxx4rh68yk6" of relation "anamneses_anamnese_perguntas" does not exist, skipping +2025-04-15T19:39:44.537-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:44.537-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkn181obfnf7s68nnoj6r159a67" of relation "anamneses_anamnese_perguntas" does not exist, skipping +2025-04-15T19:39:44.538-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:44.538-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkj180gtcsb792u2fk8bv1ritss" of relation "anamneses_historico_progresso_medico" does not exist, skipping +2025-04-15T19:39:44.539-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:44.539-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fk2wdtp4d1fp3plwa1irevgxxth" of relation "anamneses_historico_progresso_medico" does not exist, skipping +2025-04-15T19:39:44.540-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:44.540-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fk5kj7c5g7y3kfcrm7bx8e30qod" of relation "token" does not exist, skipping +2025-04-15T19:39:44.541-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:44.541-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkp9adf0r99ppueo26leonkk3dj" of relation "tutor_contato" does not exist, skipping +2025-04-15T19:39:44.541-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:44.541-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkpkk8cikgtskg8dasw3tshtg02" of relation "tutor_contato" does not exist, skipping +2025-04-15T19:39:44.542-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:44.542-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkntx5ttgu7xkuccjc0upkfxvbg" of relation "tutor_endereco" does not exist, skipping +2025-04-15T19:39:44.543-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:44.543-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkpuwl7gfirj9402n0g37q50v98" of relation "tutor_endereco" does not exist, skipping +2025-04-15T19:39:44.544-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:44.544-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkooe7ghmjfibiiiaeumgu4lrr9" of relation "usuario_consultas" does not exist, skipping +2025-04-15T19:39:44.545-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 +2025-04-15T19:39:44.545-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkbfa7h15o0v6bdi8cfhediah0i" of relation "usuario_consultas" does not exist, skipping +2025-04-15T19:39:44.557-03:00 INFO 7427 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... +2025-04-15T19:39:44.558-03:00 INFO 7427 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. From c9400cb70270c2d50ece5bfcda959eae6af1cdb1 Mon Sep 17 00:00:00 2001 From: Jean Buss Date: Tue, 15 Apr 2025 19:55:05 -0300 Subject: [PATCH 19/29] devops: testes properties --- src/test/resources/application.properties | 31 +++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/test/resources/application.properties diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties new file mode 100644 index 0000000..8c3cee5 --- /dev/null +++ b/src/test/resources/application.properties @@ -0,0 +1,31 @@ +# ================== BANCO DE DADOS POSTGRES ================== +spring.datasource.url=jdbc:h2:mem:testdb +spring.datasource.driverClassName=org.h2.Driver +spring.datasource.username=sa +spring.datasource.password=testes +spring.datasource.initialization-mode=never + +# ==================================== +# PROXY PASS +server.forward-headers-strategy = native +server.tomcat.remote-ip-header=x-forwarded-for +server.tomcat.protocol-header=x-forwarded-proto +server.servlet.session.timeout=1d +server.servlet.session.cookie.max-age=1d + +# ==================================== +# SECURITY +application.security.jwt.secret-key=404E635266556A586E3272357538782F413F4428472B4B6250645367566B5970 +application.security.jwt.expiration=86400000 +application.security.jwt.refresh-token.expiration=604800000 + +# ================== SERVIDOR ================== +server.port=8080 + +#================= LOGS =================== + +#logging.level.root = INFO + +logging.file.name= logs.log + +#logging.pattern.console=%d{yyyy-MM-dd hh:mm:ss} == %logger{40} >>> %msg%n \ No newline at end of file From d1c6b73564938329123ed039ca46fc79f078e042 Mon Sep 17 00:00:00 2001 From: Jean Buss Date: Tue, 15 Apr 2025 20:04:17 -0300 Subject: [PATCH 20/29] devops: remove dos testes --- .../npvet/DTOTest/AnamneseDTOTest.java | 71 --------- .../orbitech/npvet/DTOTest/AnimalDTOTest.java | 64 -------- .../npvet/DTOTest/ContatoDTOTest.java | 43 ------ .../npvet/DTOTest/EnderecoDTOTest.java | 74 ---------- .../npvet/DTOTest/ExameFisicoDTOTest.java | 102 ------------- .../orbitech/npvet/DTOTest/TutorDTOTest.java | 78 ---------- .../npvet/DTOTest/UsuarioDtoTest.java | 56 ------- .../orbitech/npvet/DTOTest/VacinaDTOTest.java | 60 -------- .../EntityTest/AnamneseHistoricoTest.java | 56 ------- .../EntityTest/AnamnesePerguntaTest.java | 63 -------- .../npvet/EntityTest/AnamneseTest.java | 137 ------------------ .../orbitech/npvet/EntityTest/AnimalTest.java | 88 ----------- .../npvet/EntityTest/ContatoTest.java | 42 ------ .../npvet/EntityTest/EnderecoTest.java | 74 ---------- .../npvet/EntityTest/ExameFisicoTest.java | 124 ---------------- .../npvet/EntityTest/PerguntaTest.java | 69 --------- .../orbitech/npvet/EntityTest/TutorTest.java | 73 ---------- .../npvet/EntityTest/UsuarioTest.java | 56 ------- .../orbitech/npvet/EntityTest/VacinaTest.java | 58 -------- .../orbitech/npvet/NpvetApplicationTests.java | 17 --- src/test/resources/application.properties | 31 ---- 21 files changed, 1436 deletions(-) delete mode 100644 src/test/java/com/orbitech/npvet/DTOTest/AnamneseDTOTest.java delete mode 100644 src/test/java/com/orbitech/npvet/DTOTest/AnimalDTOTest.java delete mode 100644 src/test/java/com/orbitech/npvet/DTOTest/ContatoDTOTest.java delete mode 100644 src/test/java/com/orbitech/npvet/DTOTest/EnderecoDTOTest.java delete mode 100644 src/test/java/com/orbitech/npvet/DTOTest/ExameFisicoDTOTest.java delete mode 100644 src/test/java/com/orbitech/npvet/DTOTest/TutorDTOTest.java delete mode 100644 src/test/java/com/orbitech/npvet/DTOTest/UsuarioDtoTest.java delete mode 100644 src/test/java/com/orbitech/npvet/DTOTest/VacinaDTOTest.java delete mode 100644 src/test/java/com/orbitech/npvet/EntityTest/AnamneseHistoricoTest.java delete mode 100644 src/test/java/com/orbitech/npvet/EntityTest/AnamnesePerguntaTest.java delete mode 100644 src/test/java/com/orbitech/npvet/EntityTest/AnamneseTest.java delete mode 100644 src/test/java/com/orbitech/npvet/EntityTest/AnimalTest.java delete mode 100644 src/test/java/com/orbitech/npvet/EntityTest/ContatoTest.java delete mode 100644 src/test/java/com/orbitech/npvet/EntityTest/EnderecoTest.java delete mode 100644 src/test/java/com/orbitech/npvet/EntityTest/ExameFisicoTest.java delete mode 100644 src/test/java/com/orbitech/npvet/EntityTest/PerguntaTest.java delete mode 100644 src/test/java/com/orbitech/npvet/EntityTest/TutorTest.java delete mode 100644 src/test/java/com/orbitech/npvet/EntityTest/UsuarioTest.java delete mode 100644 src/test/java/com/orbitech/npvet/EntityTest/VacinaTest.java delete mode 100644 src/test/java/com/orbitech/npvet/NpvetApplicationTests.java delete mode 100644 src/test/resources/application.properties diff --git a/src/test/java/com/orbitech/npvet/DTOTest/AnamneseDTOTest.java b/src/test/java/com/orbitech/npvet/DTOTest/AnamneseDTOTest.java deleted file mode 100644 index db9b502..0000000 --- a/src/test/java/com/orbitech/npvet/DTOTest/AnamneseDTOTest.java +++ /dev/null @@ -1,71 +0,0 @@ -package com.orbitech.npvet.DTOTest; - -import com.orbitech.npvet.dto.*; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; - -import java.util.ArrayList; -import java.util.List; - -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertNotNull; - -class AnamneseDTOTest { - - AnamneseDTO anamnese = new AnamneseDTO(); - AnimalDTO animal = new AnimalDTO(); - TutorDTO tutor = new TutorDTO(); - UsuarioDTO veterinario = new UsuarioDTO(); - AnamneseHistoricoDTO anamneseHistorico = new AnamneseHistoricoDTO(); - List anamneseHistoricos = new ArrayList<>(); - AnamnesePerguntaDTO anamnesePergunta = new AnamnesePerguntaDTO(); - List anamnesePerguntas = new ArrayList<>(); - @BeforeEach - void setUp(){ - - animal.setId(1L); - animal.setNome("Buddy"); - - tutor.setId(1L); - tutor.setCpf("123"); - - veterinario.setId("1L"); - veterinario.setNome("Dr. Smith"); - - anamneseHistorico.setId(1L); -// anamneseHistorico.setAnamnese(anamnese); - anamneseHistorico.setProgressoMedico("Medical Progress Sample One."); - - anamneseHistoricos.add(anamneseHistorico); - - anamnesePergunta.setId(1L); -// anamnesePergunta.setAnamneseDTO(anamnese); -// anamnesePergunta.setPerguntaDTO(new PerguntaDTO()); - - anamnesePerguntas.add(anamnesePergunta); - - anamnese.setId(1L); - anamnese.setAnimalDTO(animal); - anamnese.setTutorDTO(tutor); - anamnese.setVeterinarioDTO(veterinario); - anamnese.setHistoricoProgressoMedico(anamneseHistoricos); - - } - -// @Test -// void testAllArgsConstructor() { -// AnamneseDTO anamneseWithArgs = new AnamneseDTO(animal, tutor, veterinario, "queixaPrincipal", -// anamneseHistoricos, "alimentacao", "contactantes", -// "ambiente", "vacinacao", "vermifugacao", -// "sistemaRespiratorio", "sistemaCardiovascular", -// "sistemaUrinario", "sistemaReprodutor", "sistemaLocomotor", -// "sistemaNeurologico", "pele", "olhos", -// "ouvidos", anamnesePerguntas); -// assertNotNull(anamneseWithArgs); -// assertEquals(animal, anamneseWithArgs.getAnimalDTO()); -// assertEquals(tutor, anamneseWithArgs.getTutorDTO()); -// assertEquals(veterinario, anamneseWithArgs.getVeterinarioDTO()); -// assertEquals("queixaPrincipal", anamneseWithArgs.getQueixaPrincipal()); -// } - -} diff --git a/src/test/java/com/orbitech/npvet/DTOTest/AnimalDTOTest.java b/src/test/java/com/orbitech/npvet/DTOTest/AnimalDTOTest.java deleted file mode 100644 index 49f826a..0000000 --- a/src/test/java/com/orbitech/npvet/DTOTest/AnimalDTOTest.java +++ /dev/null @@ -1,64 +0,0 @@ -package com.orbitech.npvet.DTOTest; - -import com.orbitech.npvet.dto.AnimalDTO; -import com.orbitech.npvet.dto.TutorDTO; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; -import static org.junit.jupiter.api.Assertions.assertEquals; - -@SpringBootTest -class AnimalDTOTest { - - private final AnimalDTO animalDTO = new AnimalDTO(); - private final TutorDTO tutorDTO = new TutorDTO(); - - - @BeforeEach - void setUp(){ - tutorDTO.setId(2L); - tutorDTO.setNome("Alice"); - tutorDTO.setCpf("123"); - - - animalDTO.setId(1L); - animalDTO.setNome("toto"); - animalDTO.setRaca("Cachorro"); - animalDTO.setEspecie("Cachorro"); - animalDTO.setIdade(10); - animalDTO.setPelagem("baixa"); - animalDTO.setProcedencia("Duvidosa"); - animalDTO.setPeso(10.50); - animalDTO.setTutorId(tutorDTO); - - } - - @Test - void animalIdTest(){assertEquals(1L, animalDTO.getId());} - - @Test - void animalNomeTest(){assertEquals("toto", animalDTO.getNome());} - - @Test - void animalRacaTest(){assertEquals("Cachorro", animalDTO.getRaca());} - - @Test - void animalEspecieTest(){assertEquals("Cachorro", animalDTO.getEspecie());} - - @Test - void animalIdadeTest(){assertEquals(10, animalDTO.getIdade());} - - @Test - void animalPelagemTest(){assertEquals("baixa", animalDTO.getPelagem());} - - @Test - void animalProcedenciaTest(){assertEquals("Duvidosa", animalDTO.getProcedencia());} - - @Test - void animalPesoTest(){assertEquals(10.50, animalDTO.getPeso());} - - @Test - void animalTutorTest(){assertEquals(tutorDTO, animalDTO.getTutorId());} - - -} diff --git a/src/test/java/com/orbitech/npvet/DTOTest/ContatoDTOTest.java b/src/test/java/com/orbitech/npvet/DTOTest/ContatoDTOTest.java deleted file mode 100644 index 18af944..0000000 --- a/src/test/java/com/orbitech/npvet/DTOTest/ContatoDTOTest.java +++ /dev/null @@ -1,43 +0,0 @@ -package com.orbitech.npvet.DTOTest; - -import com.orbitech.npvet.dto.ContatoDTO; -import com.orbitech.npvet.dto.TutorDTO; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -import java.util.ArrayList; -import java.util.List; - -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.junit.jupiter.api.Assertions.assertEquals; - -@SpringBootTest -class ContatoDTOTest { - private ContatoDTO contato = new ContatoDTO(); - private List tutores = new ArrayList<>(); - @BeforeEach - void setup(){ - tutores.add(new TutorDTO()); - contato.setId(1L); - contato.setTelefone("4599999999"); - contato.setTutores(tutores); - } - @Test - void contatoDtoGetIdTest(){ - assertEquals(1L, contato.getId()); - } - @Test - void contatoDtoGetTelefoneTest(){ - assertEquals("4599999999", contato.getTelefone()); - } - @Test - void contatoDtoGetTutoresTest(){ - assertThat(contato.getTutores()).usingRecursiveComparison().isEqualTo(tutores); - } - @Test - void contatoDtoAllArgsTest(){ - ContatoDTO tutorAllArgs = new ContatoDTO("4599999999", tutores); - assertThat(tutorAllArgs).usingRecursiveComparison().ignoringFields("id").isEqualTo(contato); - } -} diff --git a/src/test/java/com/orbitech/npvet/DTOTest/EnderecoDTOTest.java b/src/test/java/com/orbitech/npvet/DTOTest/EnderecoDTOTest.java deleted file mode 100644 index 3839a76..0000000 --- a/src/test/java/com/orbitech/npvet/DTOTest/EnderecoDTOTest.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.orbitech.npvet.DTOTest; - -import com.orbitech.npvet.dto.EnderecoDTO; -import com.orbitech.npvet.dto.TutorDTO; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -import java.util.ArrayList; -import java.util.List; - -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.junit.jupiter.api.Assertions.assertEquals; - -@SpringBootTest -class EnderecoDTOTest { - private EnderecoDTO enderecoDTO = new EnderecoDTO(); - private List tutores = new ArrayList<>(); - @BeforeEach - void setup(){ - tutores.add(new TutorDTO()); - enderecoDTO.setId(1L); - enderecoDTO.setLogradouro("Logradouro"); - enderecoDTO.setCidade("Cidade"); - enderecoDTO.setEstado("Estado"); - enderecoDTO.setPais("Pais"); - enderecoDTO.setNumero("123"); - enderecoDTO.setCep("85851010"); - enderecoDTO.setComplemento("Complemento"); - enderecoDTO.setResidentes(tutores); - - } - @Test - void enderecoDtoGetIdTest(){ - assertEquals(1L, enderecoDTO.getId()); - } - @Test - void enderecoDtoGetLogradouroTest(){ - assertEquals("Logradouro", enderecoDTO.getLogradouro()); - } - @Test - void enderecoDtoGetCidadeTest(){ - assertEquals("Cidade", enderecoDTO.getCidade()); - } - @Test - void enderecoDtoGetEstadoTest(){ - assertEquals("Estado", enderecoDTO.getEstado()); - } - @Test - void enderecoDtoGetPaisTest(){ - assertEquals("Pais", enderecoDTO.getPais()); - } - @Test - void enderecoDtoGetNumeroTest(){ - assertEquals("123", enderecoDTO.getNumero()); - } - @Test - void enderecoDtoGetCepTest(){ - assertEquals("85851010", enderecoDTO.getCep()); - } - @Test - void enderecoDtoGetComplementoTest(){ - assertEquals("Complemento", enderecoDTO.getComplemento()); - } - @Test - void enderecoDtoGetResidentesTest(){ - assertThat(enderecoDTO.getResidentes()).usingRecursiveComparison().isEqualTo(tutores); - } -// @Test -// void enderecoDtoAllArgsTest(){ -//// EnderecoDTO enderecoAllArgs = new EnderecoDTO("Logradouro", "Cidade", "Estado", "Pais", "123", "85851010", "Complemento", tutores); -// assertThat(enderecoAllArgs).usingRecursiveComparison().ignoringFields("id").isEqualTo(enderecoDTO); -// } -} diff --git a/src/test/java/com/orbitech/npvet/DTOTest/ExameFisicoDTOTest.java b/src/test/java/com/orbitech/npvet/DTOTest/ExameFisicoDTOTest.java deleted file mode 100644 index 390be08..0000000 --- a/src/test/java/com/orbitech/npvet/DTOTest/ExameFisicoDTOTest.java +++ /dev/null @@ -1,102 +0,0 @@ -package com.orbitech.npvet.DTOTest; - -import com.orbitech.npvet.dto.AnimalDTO; -import com.orbitech.npvet.dto.ConsultaDTO; -import com.orbitech.npvet.dto.ExameFisicoDTO; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; -import java.time.LocalTime; -import static org.junit.jupiter.api.Assertions.assertEquals; - -@SpringBootTest -class ExameFisicoDTOTest { - - private final ExameFisicoDTO exameFisicoDTO = new ExameFisicoDTO(); - private final AnimalDTO animal = new AnimalDTO(); - private final ConsultaDTO consultaDTO = new ConsultaDTO(); - - @BeforeEach - void setUp() { - consultaDTO.setId(1L); - consultaDTO.setAnimal(animal); - - animal.setId(1L); - animal.setNome("toto"); - animal.setRaca("Cachorro"); - animal.setEspecie("Cachorro"); - - exameFisicoDTO.setAnimal(animal); - exameFisicoDTO.setNivelConsciencia("consiencia"); - exameFisicoDTO.setTemperaturaRetal(10.0); - exameFisicoDTO.setFrequenciaCardiaca(10.0); - exameFisicoDTO.setFrequenciaRespiratoria(10.0); - exameFisicoDTO.setTempoPreenchimentoCapilar(LocalTime.parse("08:20:45")); - exameFisicoDTO.setPulso(10.0); - exameFisicoDTO.setHidratacao("hidratacao"); - exameFisicoDTO.setLinfSubmand("linfSub"); - exameFisicoDTO.setLinfPreEscapulares("linfPre"); - exameFisicoDTO.setLinfPopliteos("linfPop"); - exameFisicoDTO.setLinfInguinais("linfIng"); - exameFisicoDTO.setMucosaOcular("mucosaOcular"); - exameFisicoDTO.setMucosaOral("mucosaOral"); - exameFisicoDTO.setMucosaPeniana("mucosaPeniana"); - exameFisicoDTO.setMucosaAnal("mucosaAnal"); - exameFisicoDTO.setPostura("postura"); - } - - @Test - void testPostura() { - assertEquals("postura", exameFisicoDTO.getPostura()); - } - - @Test - void testNivelConsciencia() { - assertEquals("consiencia", exameFisicoDTO.getNivelConsciencia()); - } - - @Test - void testTemperaturaRetal() { - assertEquals(10.0, exameFisicoDTO.getTemperaturaRetal()); - } - - @Test - void testFrequenciaCardiaca() { - assertEquals(10.0, exameFisicoDTO.getFrequenciaCardiaca()); - } - - @Test - void testFrequenciaRespiratoria() { - assertEquals(10.0, exameFisicoDTO.getFrequenciaRespiratoria()); - } - - @Test - void testTempoPreenchimentoCapilar() { - assertEquals(LocalTime.parse("08:20:45"), exameFisicoDTO.getTempoPreenchimentoCapilar()); - } - - @Test - void testPulso() { - assertEquals(10.0, exameFisicoDTO.getPulso()); - } - - @Test - void testHidratacao() { - assertEquals("hidratacao", exameFisicoDTO.getHidratacao()); - } - - @Test - void testLinfSubmand() { - assertEquals("linfSub", exameFisicoDTO.getLinfSubmand()); - } - - @Test - void testSetAnimal() { - assertEquals(animal, exameFisicoDTO.getAnimal()); - } - - @Test - void testSetPostura() { - assertEquals("postura", exameFisicoDTO.getPostura()); - } -} diff --git a/src/test/java/com/orbitech/npvet/DTOTest/TutorDTOTest.java b/src/test/java/com/orbitech/npvet/DTOTest/TutorDTOTest.java deleted file mode 100644 index d7ffbdb..0000000 --- a/src/test/java/com/orbitech/npvet/DTOTest/TutorDTOTest.java +++ /dev/null @@ -1,78 +0,0 @@ -package com.orbitech.npvet.DTOTest; - -import com.orbitech.npvet.dto.AnamneseDTO; -import com.orbitech.npvet.dto.ContatoDTO; -import com.orbitech.npvet.dto.EnderecoDTO; -import com.orbitech.npvet.dto.TutorDTO; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -import java.util.ArrayList; -import java.util.List; - -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.junit.jupiter.api.Assertions.assertEquals; - -@SpringBootTest -class TutorDTOTest { - private TutorDTO tutor = new TutorDTO(); - private List anamneseDTO = new ArrayList<>(); - private List enderecosDTO = new ArrayList<>(); - private List contatosDTO = new ArrayList<>(); - - @BeforeEach - void setup(){ - List enderecosDTO = new ArrayList<>(); - List contatosDTO = new ArrayList<>(); - tutor.setId(1L); - tutor.setNome("Nome"); - tutor.setCpf("446.460.100-62"); - tutor.setRg("11.011.455-9"); - tutor.setEmail("email@email.com"); - tutor.setAnamneses(anamneseDTO); - tutor.setEnderecos(enderecosDTO); - tutor.setTelefones(contatosDTO); - } - - @Test - void tutorDtoGetIdTest(){ - assertEquals(1L, tutor.getId()); - } - @Test - void tutorDtoGetNomeTest(){ - assertEquals("Nome", tutor.getNome()); - } - @Test - void tutorDtoGetCpfTest(){ - assertEquals("446.460.100-62", tutor.getCpf()); - } - @Test - void tutorDtoGetRgTest(){ - assertEquals("11.011.455-9", tutor.getRg()); - } - @Test - void tutorDtoGetEmailTest(){ - assertEquals("email@email.com", tutor.getEmail()); - } - @Test - void tutorDtoGetAnamnesesTest(){ - assertThat(tutor.getAnamneses()).usingRecursiveComparison().isEqualTo(anamneseDTO); - } - @Test - void tutorDtoGetEnderecosTest(){ - List enderecos = new ArrayList<>(); - assertThat(tutor.getEnderecos()).usingRecursiveComparison().isEqualTo(enderecos); - } - @Test - void tutorDtoGetTelefonesTest() { - List telefones = new ArrayList<>(); - assertThat(tutor.getTelefones()).usingRecursiveComparison().isEqualTo(telefones); - } -// @Test -// void tutorDtoAllArgsTest(){ -// TutorDTO tutorDTO = new TutorDTO("Nome", "446.460.100-62", "11.011.455-9", "email@email.com", anamneseDTO, contatosDTO, enderecosDTO); -// assertThat(tutorDTO).usingRecursiveComparison().ignoringFields("id").isEqualTo(tutor); -// } - -} diff --git a/src/test/java/com/orbitech/npvet/DTOTest/UsuarioDtoTest.java b/src/test/java/com/orbitech/npvet/DTOTest/UsuarioDtoTest.java deleted file mode 100644 index bae72dc..0000000 --- a/src/test/java/com/orbitech/npvet/DTOTest/UsuarioDtoTest.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.orbitech.npvet.DTOTest; - -import com.orbitech.npvet.dto.UsuarioDTO; -import com.orbitech.npvet.entity.Role; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -@SpringBootTest - class UsuarioDtoTest { - - private UsuarioDTO usuarioDTO = new UsuarioDTO(); - - @BeforeEach - void setUp(){ - usuarioDTO.setRole(Role.SECRETARIA); - usuarioDTO.setNome("nome"); -// usuarioDTO.setSenha("senha"); - usuarioDTO.setId("1L"); - usuarioDTO.setUsername("username"); - usuarioDTO.setCpf("cpf"); - } - - @Test - void usuarioIdTest(){ - assertEquals("1L",usuarioDTO.getId()); - } - - @Test - void usuarioNomeTest(){ - assertEquals("nome",usuarioDTO.getNome()); - } - - @Test - void usuarioTipoTest(){ - assertEquals(Role.SECRETARIA,usuarioDTO.getRole()); - } - -// @Test -// void usuarioSenhaTest(){ -// assertEquals("senha",usuarioDTO.getSenha()); -// } - - @Test - void usuarioUsernameTest(){ - assertEquals("username",usuarioDTO.getUsername()); - } - - @Test - void usuarioCpfTest(){ - assertEquals("cpf",usuarioDTO.getCpf()); - } - -} diff --git a/src/test/java/com/orbitech/npvet/DTOTest/VacinaDTOTest.java b/src/test/java/com/orbitech/npvet/DTOTest/VacinaDTOTest.java deleted file mode 100644 index 102be86..0000000 --- a/src/test/java/com/orbitech/npvet/DTOTest/VacinaDTOTest.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.orbitech.npvet.DTOTest; - -import com.orbitech.npvet.dto.AnimalDTO; -import com.orbitech.npvet.dto.VacinaDTO; -import com.orbitech.npvet.entity.Animal; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -import java.time.LocalDate; -import java.time.Month; - -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.junit.jupiter.api.Assertions.assertEquals; - -@SpringBootTest -class VacinaDTOTest { - private VacinaDTO vacinaDTO = new VacinaDTO(); - private LocalDate aplicacao = LocalDate.of(2023, Month.SEPTEMBER, 26); - - @BeforeEach - void setup() { - - vacinaDTO.setId(1L); - vacinaDTO.setNome("Vacina"); - vacinaDTO.setDescricao("Descricao"); - vacinaDTO.setDataAplicacao(aplicacao); - vacinaDTO.setDataRetorno(aplicacao); - vacinaDTO.setAnimal(new AnimalDTO()); - } - @Test - void vacinaIdTest(){ - assertEquals(1L, vacinaDTO.getId()); - } - @Test - void vacinaNomeTest(){ - assertEquals("Vacina", vacinaDTO.getNome()); - } - @Test - void vacinaDescricaoTest(){ - assertEquals("Descricao", vacinaDTO.getDescricao()); - } - @Test - void vacinaAplicacaoTest(){ - assertEquals(aplicacao, vacinaDTO.getDataAplicacao()); - } - @Test - void vacinaRetornoTest(){ - assertEquals(aplicacao, vacinaDTO.getDataRetorno()); - } - @Test - void vacinaAnimalTest(){ - assertThat(vacinaDTO.getAnimal()).usingRecursiveComparison().isEqualTo(new Animal()); - } - @Test - void vacinaAllArgsConstructorTest(){ - VacinaDTO vacinaAllArgs = new VacinaDTO("Vacina", aplicacao, aplicacao, "Descricao", new AnimalDTO()); - assertThat(vacinaAllArgs).usingRecursiveComparison().ignoringFields("id").isEqualTo(vacinaDTO); - } -} \ No newline at end of file diff --git a/src/test/java/com/orbitech/npvet/EntityTest/AnamneseHistoricoTest.java b/src/test/java/com/orbitech/npvet/EntityTest/AnamneseHistoricoTest.java deleted file mode 100644 index a344740..0000000 --- a/src/test/java/com/orbitech/npvet/EntityTest/AnamneseHistoricoTest.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.orbitech.npvet.EntityTest; - -import com.orbitech.npvet.entity.AnamneseHistorico; -import com.orbitech.npvet.entity.Anamnese; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -import java.time.LocalDate; - -import static org.junit.jupiter.api.Assertions.*; -@SpringBootTest -class AnamneseHistoricoTest { - -// @Test -// void testAllArgsConstructor() { -// Anamnese anamnese = new Anamnese(); -// anamnese.setId(1L); -// -// LocalDate dataAtualizacao = LocalDate.now(); -// String progressoMedico = "Test Progresso Medico"; -// -//// AnamneseHistorico anamneseHistorico = new AnamneseHistorico(anamnese, progressoMedico, dataAtualizacao); -// assertNotNull(anamneseHistorico); -//// assertEquals(anamnese, anamneseHistorico.getAnamnese()); -// assertEquals(progressoMedico, anamneseHistorico.getProgressoMedico()); -// assertEquals(dataAtualizacao, anamneseHistorico.getDataAtualizacao()); -// } - -// @Test -// void testAnamnese() { -// Anamnese anamnese = new Anamnese(); -// anamnese.setId(1L); -// -// AnamneseHistorico anamneseHistorico = new AnamneseHistorico(); -// anamneseHistorico.setAnamnese(anamnese); -// assertEquals(anamnese, anamneseHistorico.getAnamnese()); -// } - - @Test - void testProgressoMedico() { - AnamneseHistorico anamneseHistorico = new AnamneseHistorico(); - anamneseHistorico.setProgressoMedico("Test Progresso Medico"); - assertEquals("Test Progresso Medico", anamneseHistorico.getProgressoMedico()); - } - - @Test - void testDataAtualizacao() { - AnamneseHistorico anamneseHistorico = new AnamneseHistorico(); - assertNull(anamneseHistorico.getDataAtualizacao()); - - anamneseHistorico.prePersistDataAtualizacao(); - assertNotNull(anamneseHistorico.getDataAtualizacao()); - assertEquals(LocalDate.now(), anamneseHistorico.getDataAtualizacao()); - } -} diff --git a/src/test/java/com/orbitech/npvet/EntityTest/AnamnesePerguntaTest.java b/src/test/java/com/orbitech/npvet/EntityTest/AnamnesePerguntaTest.java deleted file mode 100644 index 1b6c97f..0000000 --- a/src/test/java/com/orbitech/npvet/EntityTest/AnamnesePerguntaTest.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.orbitech.npvet.EntityTest; - -import com.orbitech.npvet.entity.AnamnesePergunta; -import com.orbitech.npvet.entity.Anamnese; -import com.orbitech.npvet.entity.Pergunta; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -import static org.junit.jupiter.api.Assertions.*; - -@SpringBootTest -class AnamnesePerguntaTest { - - private AnamnesePergunta anamnesePergunta; - - @BeforeEach - void setUp() { - anamnesePergunta = new AnamnesePergunta(); - Anamnese anamnese = new Anamnese(); - Pergunta pergunta = new Pergunta(); - - anamnese.setId(1L); - pergunta.setId(1L); - -// anamnesePergunta.setAnamnese(anamnese); -// anamnesePergunta.setPergunta(pergunta); -// anamnesePergunta.setResposta("Test Resposta"); - } - -// @Test -// void testAllArgsConstructor() { -// Anamnese anamnese = new Anamnese(); -// Pergunta pergunta = new Pergunta(); -// -// anamnese.setId(1L); -// pergunta.setId(1L); -// -// AnamnesePergunta anamnesePerguntaWithArgs = new AnamnesePergunta(anamnese, pergunta, "Test Resposta"); -// assertNotNull(anamnesePerguntaWithArgs); -// assertEquals(1L, anamnesePerguntaWithArgs.getAnamnese().getId()); -// assertEquals(1L, anamnesePerguntaWithArgs.getPergunta().getId()); -// assertEquals("Test Resposta", anamnesePerguntaWithArgs.getResposta()); -// } - -// @Test -// void testAnamnese() { -// assertNotNull(anamnesePergunta.getAnamnese()); -// assertEquals(1L, anamnesePergunta.getAnamnese().getId()); -// } - -// @Test -// void testPergunta() { -// assertNotNull(anamnesePergunta.getPergunta()); -// assertEquals(1L, anamnesePergunta.getPergunta().getId()); -// } - -// @Test -// void testResposta() { -// assertEquals("Test Resposta", anamnesePergunta.getResposta()); -// } -} diff --git a/src/test/java/com/orbitech/npvet/EntityTest/AnamneseTest.java b/src/test/java/com/orbitech/npvet/EntityTest/AnamneseTest.java deleted file mode 100644 index 1554474..0000000 --- a/src/test/java/com/orbitech/npvet/EntityTest/AnamneseTest.java +++ /dev/null @@ -1,137 +0,0 @@ -package com.orbitech.npvet.EntityTest; - -import com.orbitech.npvet.entity.*; - -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -import java.util.ArrayList; -import java.util.List; - - -import static org.junit.jupiter.api.Assertions.*; -@SpringBootTest -class AnamneseTest { - - Anamnese anamnese = new Anamnese(); - Animal animal = new Animal(); - Tutor tutor = new Tutor(); - Usuario veterinario = new Usuario(); - AnamneseHistorico anamneseHistorico = new AnamneseHistorico(); - List anamneseHistoricos = new ArrayList<>(); - AnamnesePergunta anamnesePergunta = new AnamnesePergunta(); - List anamnesePerguntas = new ArrayList<>(); - @BeforeEach - void setUp(){ - - animal.setId(1L); - animal.setNome("Buddy"); - - tutor.setId(1L); - tutor.setCpf("123"); - - veterinario.setId(1L); - veterinario.setNome("Dr. Smith"); - - anamneseHistorico.setId(1L); -// anamneseHistorico.setAnamnese(anamnese); - anamneseHistorico.setProgressoMedico("Medical Progress Sample One."); - - anamneseHistoricos.add(anamneseHistorico); - - anamnesePergunta.setId(1L); -// anamnesePergunta.setAnamnese(anamnese); -// anamnesePergunta.setPergunta(new Pergunta()); - - anamnesePerguntas.add(anamnesePergunta); - - anamnese.setId(1L); - anamnese.setAnimal(animal); - anamnese.setTutor(tutor); - anamnese.setVeterinario(veterinario); - anamnese.setHistoricoProgressoMedico(anamneseHistoricos); - - } - -// @Test -// void testAllArgsConstructor() { -// Anamnese anamneseWithArgs = new Anamnese(animal, tutor, veterinario, "queixaPrincipal", -// anamneseHistoricos, "alimentacao", "contactantes", -// "ambiente", "vacinacao", "vermifugacao", -// "sistemaRespiratorio", "sistemaCardiovascular", -// "sistemaUrinario", "sistemaReprodutor", "sistemaLocomotor", -// "sistemaNeurologico", "pele", "olhos", -// "ouvidos", anamnesePerguntas); -// assertNotNull(anamneseWithArgs); -// assertEquals(animal, anamneseWithArgs.getAnimal()); -// assertEquals(tutor, anamneseWithArgs.getTutor()); -// assertEquals(veterinario, anamneseWithArgs.getVeterinario()); -// assertEquals("queixaPrincipal", anamneseWithArgs.getQueixaPrincipal()); -// } - - @Test - void testTutor() { - Tutor newTutor = new Tutor(); - newTutor.setId(2L); - newTutor.setCpf("456"); - anamnese.setTutor(newTutor); - assertEquals(newTutor, anamnese.getTutor()); - } - - @Test - void testVeterinario() { - Usuario newVeterinario = new Usuario(); - newVeterinario.setId(2L); - newVeterinario.setNome("Dr. Johnson"); - anamnese.setVeterinario(newVeterinario); - assertEquals(newVeterinario, anamnese.getVeterinario()); - } - - @Test - void testAnimal() { - Animal newAnimal = new Animal(); - newAnimal.setId(2L); - newAnimal.setNome("Fido"); - anamnese.setAnimal(newAnimal); - assertEquals(newAnimal, anamnese.getAnimal()); - } - - @Test - void testEqualsAndHashCode() { - Anamnese anamnese1 = new Anamnese(); - anamnese1.setId(1L); - Anamnese anamnese2 = new Anamnese(); - anamnese2.setId(1L); - - assertEquals(anamnese1, anamnese2); - assertEquals(anamnese1.hashCode(), anamnese2.hashCode()); - - Anamnese differentAnamnese = new Anamnese(); - differentAnamnese.setId(2L); - assertNotEquals(null, anamnese1); - } - - @Test - void testHistoricoProgressoMedico() { - List historicoProgressoMedico = new ArrayList<>(); - AnamneseHistorico historico1 = new AnamneseHistorico(); - AnamneseHistorico historico2 = new AnamneseHistorico(); - historicoProgressoMedico.add(historico1); - historicoProgressoMedico.add(historico2); - anamnese.setHistoricoProgressoMedico(historicoProgressoMedico); - assertEquals(historicoProgressoMedico, anamnese.getHistoricoProgressoMedico()); - } - - @Test - void testAnamnesePerguntas() { - List anamnesePerguntas = new ArrayList<>(); - AnamnesePergunta pergunta1 = new AnamnesePergunta(); - AnamnesePergunta pergunta2 = new AnamnesePergunta(); - anamnesePerguntas.add(pergunta1); - anamnesePerguntas.add(pergunta2); - anamnese.setAnamnesePerguntas(anamnesePerguntas); - assertEquals(anamnesePerguntas, anamnese.getAnamnesePerguntas()); - } - -} diff --git a/src/test/java/com/orbitech/npvet/EntityTest/AnimalTest.java b/src/test/java/com/orbitech/npvet/EntityTest/AnimalTest.java deleted file mode 100644 index 33e70c5..0000000 --- a/src/test/java/com/orbitech/npvet/EntityTest/AnimalTest.java +++ /dev/null @@ -1,88 +0,0 @@ -package com.orbitech.npvet.EntityTest; - -import com.orbitech.npvet.entity.*; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -import java.util.ArrayList; -import java.util.List; - -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.junit.jupiter.api.Assertions.assertEquals; - -@SpringBootTest -class AnimalTest { - - private Animal animal = new Animal(); - private Tutor tutor = new Tutor(); - - - @BeforeEach - void setUp(){ - List anamnese = new ArrayList<>(); - List consulta = new ArrayList<>(); - List vacina = new ArrayList<>(); - - - tutor.setId(2L); - tutor.setNome("Alice"); - tutor.setCpf("123"); - - - animal.setId(1L); - animal.setNome("nome"); - animal.setRaca("raca"); - animal.setEspecie("especie"); - animal.setIdade(11); - animal.setPelagem("pelagem"); - animal.setProcedencia("procedencia"); - animal.setPeso(10.50); - animal.setTutorId(tutor); - animal.setVacinas(vacina); - animal.setConsulta(consulta); - animal.setAnamneses(anamnese); - animal.setSexo(Sexo.MACHO); - - } - - @Test - void animalIdTest(){assertEquals(1L, animal.getId());} - - @Test - void animalNomeTest(){assertEquals("nome", animal.getNome());} - - @Test - void animalRacaTest(){assertEquals("raca", animal.getRaca());} - - @Test - void animalEspecieTest(){assertEquals("especie", animal.getEspecie());} - - @Test - void animalIdadeTest(){assertEquals(11, animal.getIdade());} - - @Test - void animalPelagemTest(){assertEquals("pelagem", animal.getPelagem());} - - @Test - void animalProcedenciaTest(){assertEquals("procedencia", animal.getProcedencia());} - - @Test - void animalPesoTest(){assertEquals(10.50, animal.getPeso());} - - @Test - void animalTutorTest(){assertEquals(tutor, animal.getTutorId());} - - @Test - void animalAllArgsConstructor(){ - List anamnese = new ArrayList<>(); - List consulta = new ArrayList<>(); - List vacina = new ArrayList<>(); - - Animal animalAllArgs = new Animal("nome", "especie", "raca", Sexo.MACHO, 11, 10.50, "pelagem", "procedencia", tutor, anamnese, consulta, vacina); - assertThat(animalAllArgs).usingRecursiveComparison().ignoringFields("id").isEqualTo(animal); - - - } - -} diff --git a/src/test/java/com/orbitech/npvet/EntityTest/ContatoTest.java b/src/test/java/com/orbitech/npvet/EntityTest/ContatoTest.java deleted file mode 100644 index 9af3a7c..0000000 --- a/src/test/java/com/orbitech/npvet/EntityTest/ContatoTest.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.orbitech.npvet.EntityTest; -import com.orbitech.npvet.entity.Contato; -import com.orbitech.npvet.entity.Tutor; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; -import java.util.ArrayList; -import java.util.List; -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.junit.jupiter.api.Assertions.assertEquals; - -@SpringBootTest -class ContatoTest { - private Contato contato = new Contato(); - private List tutores = new ArrayList<>(); - - - @BeforeEach - void setup(){ - tutores.add(new Tutor()); - contato.setId(1L); - contato.setTelefone("4599999999"); - contato.setTutores(tutores); - } - @Test - void contatoGetIdTest(){ - assertEquals(1L, contato.getId()); - } - @Test - void contatoGetTelefoneTest(){ - assertEquals("4599999999", contato.getTelefone()); - } - @Test - void contatoGetTutoresTest(){ - assertThat(contato.getTutores()).usingRecursiveComparison().isEqualTo(tutores); - } - @Test - void contatoAllArgsTest(){ - Contato tutorAllArgs = new Contato("4599999999", tutores); - assertThat(tutorAllArgs).usingRecursiveComparison().ignoringFields("id").isEqualTo(contato); - } -} diff --git a/src/test/java/com/orbitech/npvet/EntityTest/EnderecoTest.java b/src/test/java/com/orbitech/npvet/EntityTest/EnderecoTest.java deleted file mode 100644 index fbb236c..0000000 --- a/src/test/java/com/orbitech/npvet/EntityTest/EnderecoTest.java +++ /dev/null @@ -1,74 +0,0 @@ -package com.orbitech.npvet.EntityTest; - -import com.orbitech.npvet.entity.Endereco; -import com.orbitech.npvet.entity.Tutor; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -import java.util.ArrayList; -import java.util.List; - -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.junit.jupiter.api.Assertions.assertEquals; - -@SpringBootTest -class EnderecoTest { - private Endereco endereco = new Endereco(); - private List tutores = new ArrayList<>(); - @BeforeEach - void setup(){ - tutores.add(new Tutor()); - endereco.setId(1L); - endereco.setLogradouro("Logradouro"); - endereco.setCidade("Cidade"); - endereco.setEstado("Estado"); - endereco.setPais("Pais"); - endereco.setNumero("123"); - endereco.setCep("85851010"); - endereco.setComplemento("Complemento"); - endereco.setResidentes(tutores); - - } - @Test - void enderecoDtoGetIdTest(){ - assertEquals(1L, endereco.getId()); - } - @Test - void enderecoDtoGetLogradouroTest(){ - assertEquals("Logradouro", endereco.getLogradouro()); - } - @Test - void enderecoDtoGetCidadeTest(){ - assertEquals("Cidade", endereco.getCidade()); - } - @Test - void enderecoDtoGetEstadoTest(){ - assertEquals("Estado", endereco.getEstado()); - } - @Test - void enderecoDtoGetPaisTest(){ - assertEquals("Pais", endereco.getPais()); - } - @Test - void enderecoDtoGetNumeroTest(){ - assertEquals("123", endereco.getNumero()); - } - @Test - void enderecoDtoGetCepTest(){ - assertEquals("85851010", endereco.getCep()); - } - @Test - void enderecoDtoGetComplementoTest(){ - assertEquals("Complemento", endereco.getComplemento()); - } - @Test - void enderecoDtoGetResidentesTest(){ - assertThat(endereco.getResidentes()).usingRecursiveComparison().isEqualTo(tutores); - } -// @Test -// void enderecoDtoAllArgsTest(){ -// Endereco enderecoAllArgs = new Endereco("Logradouro", "Cidade", "Estado", "Pais", "123", "85851010", "Complemento", tutores); -// assertThat(enderecoAllArgs).usingRecursiveComparison().ignoringFields("id").isEqualTo(endereco); -// } -} diff --git a/src/test/java/com/orbitech/npvet/EntityTest/ExameFisicoTest.java b/src/test/java/com/orbitech/npvet/EntityTest/ExameFisicoTest.java deleted file mode 100644 index 0925644..0000000 --- a/src/test/java/com/orbitech/npvet/EntityTest/ExameFisicoTest.java +++ /dev/null @@ -1,124 +0,0 @@ -package com.orbitech.npvet.EntityTest; - -import com.orbitech.npvet.entity.Animal; -import com.orbitech.npvet.entity.Consulta; -import com.orbitech.npvet.entity.ExameFisico; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; -import java.time.LocalTime; -import static org.junit.jupiter.api.Assertions.assertEquals; - -@SpringBootTest -class ExameFisicoTest { - - private final ExameFisico exameFisico = new ExameFisico(); - private final Animal animal = new Animal(); - private final Consulta consulta= new Consulta(); - @BeforeEach - void setUp() { - - consulta.setId(1L); - consulta.setAnimal(animal); - - - animal.setId(1L); - animal.setNome("toto"); - animal.setRaca("Cachorro"); - animal.setEspecie("Cachorro"); - - exameFisico.setAnimal(animal); - exameFisico.setNivelConsciencia("consiencia"); - exameFisico.setTemperaturaRetal(10.0); - exameFisico.setFrequenciaCardiaca(10.0); - exameFisico.setFrequenciaRespiratoria(10.0); - exameFisico.setTempoPreenchimentoCapilar(LocalTime.parse("08:20:45")); - exameFisico.setPulso(10.0); - exameFisico.setHidratacao("hidratacao"); - exameFisico.setLinfSubmand("linfSub"); - exameFisico.setLinfPreEscapulares("linfPre"); - exameFisico.setLinfPopliteos("linfPop"); - exameFisico.setLinfInguinais("linfIng"); - exameFisico.setMucosaOcular("mucosaOcular"); - exameFisico.setMucosaOral("mucosaOral"); - exameFisico.setMucosaPeniana("mucosaPeniana"); - exameFisico.setMucosaAnal("mucosaAnal"); - exameFisico.setAnimal(animal); - exameFisico.setConsulta(consulta); - exameFisico.setPostura("postura"); - - } - - @Test - void testPostura(){assertEquals("postura", exameFisico.getPostura());} - - @Test - void testNivelConsciencia(){assertEquals("consiencia", exameFisico.getNivelConsciencia());} - - @Test - void testTemperaturaRetal(){assertEquals(10.0, exameFisico.getTemperaturaRetal());} - - @Test - void testFrequenciaCardiaca(){assertEquals(10.0, exameFisico.getFrequenciaCardiaca());} - - @Test - void testFrequenciaRespiratoria(){assertEquals(10.0, exameFisico.getFrequenciaRespiratoria());} - - @Test - void testTempoPreenchimentoCapilar(){assertEquals(LocalTime.parse("08:20:45"), exameFisico.getTempoPreenchimentoCapilar());} - - @Test - void testPulso(){assertEquals(10.0, exameFisico.getPulso());} - - @Test - void testHidratacao(){assertEquals("hidratacao", exameFisico.getHidratacao());} - - @Test - void testLinfSubmand(){assertEquals("linfSub", exameFisico.getLinfSubmand());} - - @Test - void testLinfPreEscapulares() { - assertEquals("linfPre", exameFisico.getLinfPreEscapulares()); - } - - @Test - void testLinfPopliteos() { - assertEquals("linfPop", exameFisico.getLinfPopliteos()); - } - - @Test - void testLinfInguinais() { - assertEquals("linfIng", exameFisico.getLinfInguinais()); - } - - @Test - void testMucosaOcular() { - assertEquals("mucosaOcular", exameFisico.getMucosaOcular()); - } - - @Test - void testMucosaOral() { - assertEquals("mucosaOral", exameFisico.getMucosaOral()); - } - - @Test - void testMucosaPeniana() { - assertEquals("mucosaPeniana", exameFisico.getMucosaPeniana()); - } - - @Test - void testMucosaAnal() { - assertEquals("mucosaAnal", exameFisico.getMucosaAnal()); - } - - @Test - void testAnimal() { - assertEquals(animal, exameFisico.getAnimal()); - } - - @Test - void testConsulta() { - assertEquals(consulta, exameFisico.getConsulta()); - } - -} diff --git a/src/test/java/com/orbitech/npvet/EntityTest/PerguntaTest.java b/src/test/java/com/orbitech/npvet/EntityTest/PerguntaTest.java deleted file mode 100644 index 75016c5..0000000 --- a/src/test/java/com/orbitech/npvet/EntityTest/PerguntaTest.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.orbitech.npvet.EntityTest; - -import com.orbitech.npvet.entity.AnamnesePergunta; -import com.orbitech.npvet.entity.Pergunta; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -import java.util.ArrayList; -import java.util.List; - -import static org.junit.jupiter.api.Assertions.*; -@SpringBootTest -class PerguntaTest { - - private Pergunta pergunta; - - List anamnesePerguntas = new ArrayList<>(); - - - @BeforeEach - void setUp() { - pergunta = new Pergunta(); - pergunta.setEnunciado("Test Enunciado"); - - - AnamnesePergunta anamnese1 = new AnamnesePergunta(); - AnamnesePergunta anamnese2 = new AnamnesePergunta(); - - anamnesePerguntas.add(anamnese1); - anamnesePerguntas.add(anamnese2); - - } - - @Test - void testSetAndGetEnunciado() { - String enunciado = "Test Enunciado"; - pergunta.setEnunciado(enunciado); - assertEquals(enunciado, pergunta.getEnunciado()); - } - -// @Test -// void testAnamnesePerguntas() { -// pergunta.setAnamnesePerguntas(anamnesePerguntas); -// assertEquals(anamnesePerguntas, pergunta.getAnamnesePerguntas()); -// } - - @Test - void testNoArgsConstructor() { - assertNotNull(pergunta); - } - -// @Test -// void testAllArgsConstructor() { -// Pergunta perguntaWithArgs = new Pergunta(anamnesePerguntas,"Test Enunciado"); -// assertNotNull(perguntaWithArgs); -// assertEquals("Test Enunciado", perguntaWithArgs.getEnunciado()); -// } - - @Test - void testPerguntaConstructor() { - String enunciado = "Test Enunciado"; - Pergunta pergunta = new Pergunta(enunciado); - assertNotNull(pergunta); - assertEquals(enunciado, pergunta.getEnunciado()); - } - - -} diff --git a/src/test/java/com/orbitech/npvet/EntityTest/TutorTest.java b/src/test/java/com/orbitech/npvet/EntityTest/TutorTest.java deleted file mode 100644 index dc9b59d..0000000 --- a/src/test/java/com/orbitech/npvet/EntityTest/TutorTest.java +++ /dev/null @@ -1,73 +0,0 @@ -package com.orbitech.npvet.EntityTest; - -import com.orbitech.npvet.entity.Anamnese; -import com.orbitech.npvet.entity.Contato; -import com.orbitech.npvet.entity.Endereco; -import com.orbitech.npvet.entity.Tutor; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -import java.util.ArrayList; -import java.util.List; - -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.junit.jupiter.api.Assertions.assertEquals; - -@SpringBootTest -class TutorTest { - private Tutor tutor = new Tutor(); - private List enderecos = new ArrayList<>(); - private List contatos = new ArrayList<>(); - private List anamneses = new ArrayList<>(); - @BeforeEach - void setup(){ - tutor.setId(1L); - tutor.setNome("Nome"); - tutor.setCpf("446.460.100-62"); - tutor.setRg("11.011.455-9"); - tutor.setEmail("email@email.com"); - tutor.setAnamneses(anamneses); - tutor.setEnderecos(enderecos); - tutor.setTelefones(contatos); - } - - @Test - void tutorGetIdTest(){ - assertEquals(1L, tutor.getId()); - } - @Test - void tutorGetNomeTest(){ - assertEquals("Nome", tutor.getNome()); - } - @Test - void tutorGetCpfTest(){ - assertEquals("446.460.100-62", tutor.getCpf()); - } - @Test - void tutorGetRgTest(){ - assertEquals("11.011.455-9", tutor.getRg()); - } - @Test - void tutorGetEmailTest(){ - assertEquals("email@email.com", tutor.getEmail()); - } - @Test - void tutorGetEnderecosTest(){ - assertThat(tutor.getEnderecos()).usingRecursiveComparison().isEqualTo(enderecos); - } - @Test - void tutorGetAnamnesesTest(){ - assertThat(tutor.getAnamneses()).usingRecursiveComparison().isEqualTo(anamneses); - } - @Test - void tutorGetTelefonesTest() { - assertThat(tutor.getTelefones()).usingRecursiveComparison().isEqualTo(contatos); - } -// @Test -// void tutorAllArgsTest(){ -// Tutor tutorAllArgs = new Tutor("Nome", "446.460.100-62", "11.011.455-9", "email@email.com", anamneses, contatos, enderecos); -// assertThat(tutorAllArgs).usingRecursiveComparison().ignoringFields("id").isEqualTo(tutor); -// } - -} diff --git a/src/test/java/com/orbitech/npvet/EntityTest/UsuarioTest.java b/src/test/java/com/orbitech/npvet/EntityTest/UsuarioTest.java deleted file mode 100644 index 2498e4e..0000000 --- a/src/test/java/com/orbitech/npvet/EntityTest/UsuarioTest.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.orbitech.npvet.EntityTest; - -import com.orbitech.npvet.entity.Role; -import com.orbitech.npvet.entity.Usuario; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -import static org.junit.jupiter.api.Assertions.assertEquals; - -@SpringBootTest -class UsuarioTest { - - Usuario usuario = new Usuario(); - - @BeforeEach - void setUp(){ - usuario.setRole(Role.SECRETARIA); - usuario.setNome("nome"); -// usuario.setSenha("senha"); - usuario.setId(1L); - usuario.setUsername("username"); - usuario.setCpf("cpf"); - } - - @Test - void usuarioIdTest(){ - assertEquals(1L,usuario.getId()); - } - - @Test - void usuarioNomeTest(){ - assertEquals("nome",usuario.getNome()); - } - - @Test - void usuarioTipoTest(){ - assertEquals(Role.SECRETARIA,usuario.getRole()); - } - -// @Test -// void usuarioSenhaTest(){ -// assertEquals("senha",usuario.getSenha()); -// } - - @Test - void usuarioUsernameTest(){ - assertEquals("username",usuario.getUsername()); - } - - @Test - void usuarioCpfTest(){ - assertEquals("cpf",usuario.getCpf()); - } - -} diff --git a/src/test/java/com/orbitech/npvet/EntityTest/VacinaTest.java b/src/test/java/com/orbitech/npvet/EntityTest/VacinaTest.java deleted file mode 100644 index f33f789..0000000 --- a/src/test/java/com/orbitech/npvet/EntityTest/VacinaTest.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.orbitech.npvet.EntityTest; - -import com.orbitech.npvet.entity.Animal; -import com.orbitech.npvet.entity.Vacina; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; - -import java.time.LocalDate; -import java.time.Month; - -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; -import static org.junit.jupiter.api.Assertions.assertEquals; - -@SpringBootTest -class VacinaTest { - private Vacina vacina = new Vacina(); - private LocalDate aplicacao = LocalDate.of(2023, Month.SEPTEMBER, 26); - @BeforeEach - void setup() { - - vacina.setId(1L); - vacina.setNome("Vacina"); - vacina.setDescricao("Descricao"); - vacina.setDataAplicacao(aplicacao); - vacina.setDataRetorno(aplicacao); - vacina.setAnimal(new Animal()); - } - @Test - void vacinaIdTest(){ - assertEquals(1L, vacina.getId()); - } - @Test - void vacinaNomeTest(){ - assertEquals("Vacina", vacina.getNome()); - } - @Test - void vacinaDescricaoTest(){ - assertEquals("Descricao", vacina.getDescricao()); - } - @Test - void vacinaAplicacaoTest(){ - assertEquals(aplicacao, vacina.getDataAplicacao()); - } - @Test - void vacinaRetornoTest(){ - assertEquals(aplicacao, vacina.getDataRetorno()); - } - @Test - void vacinaAnimalTest(){ - assertThat(vacina.getAnimal()).usingRecursiveComparison().isEqualTo(new Animal()); - } - @Test - void vacinaAllArgsConstructorTest(){ - Vacina vacinaAllArgs = new Vacina("Vacina", aplicacao, aplicacao, "Descricao", new Animal()); - assertThat(vacinaAllArgs).usingRecursiveComparison().ignoringFields("id").isEqualTo(vacina); - } -} \ No newline at end of file diff --git a/src/test/java/com/orbitech/npvet/NpvetApplicationTests.java b/src/test/java/com/orbitech/npvet/NpvetApplicationTests.java deleted file mode 100644 index 091bbe8..0000000 --- a/src/test/java/com/orbitech/npvet/NpvetApplicationTests.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.orbitech.npvet; - -import org.junit.jupiter.api.Test; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.context.ApplicationContext; - -import static org.assertj.core.api.AssertionsForClassTypes.assertThat; - -@SpringBootTest -class NpvetApplicationTests { - - @Test - void contextLoads(ApplicationContext context) { - assertThat(context).isNotNull(); - } - -} \ No newline at end of file diff --git a/src/test/resources/application.properties b/src/test/resources/application.properties deleted file mode 100644 index 8c3cee5..0000000 --- a/src/test/resources/application.properties +++ /dev/null @@ -1,31 +0,0 @@ -# ================== BANCO DE DADOS POSTGRES ================== -spring.datasource.url=jdbc:h2:mem:testdb -spring.datasource.driverClassName=org.h2.Driver -spring.datasource.username=sa -spring.datasource.password=testes -spring.datasource.initialization-mode=never - -# ==================================== -# PROXY PASS -server.forward-headers-strategy = native -server.tomcat.remote-ip-header=x-forwarded-for -server.tomcat.protocol-header=x-forwarded-proto -server.servlet.session.timeout=1d -server.servlet.session.cookie.max-age=1d - -# ==================================== -# SECURITY -application.security.jwt.secret-key=404E635266556A586E3272357538782F413F4428472B4B6250645367566B5970 -application.security.jwt.expiration=86400000 -application.security.jwt.refresh-token.expiration=604800000 - -# ================== SERVIDOR ================== -server.port=8080 - -#================= LOGS =================== - -#logging.level.root = INFO - -logging.file.name= logs.log - -#logging.pattern.console=%d{yyyy-MM-dd hh:mm:ss} == %logger{40} >>> %msg%n \ No newline at end of file From 95cb148bc80b2c2f14728bc6eb2cc9e8268d7222 Mon Sep 17 00:00:00 2001 From: Bouchra Akl Date: Wed, 23 Apr 2025 19:41:49 -0300 Subject: [PATCH 21/29] feat: health endpoint. --- .../npvet/controller/HealthController.java | 15 +++++++++++++++ .../oauth/security/ApplicationSecurityConfig.java | 5 +---- 2 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 src/main/java/com/orbitech/npvet/controller/HealthController.java diff --git a/src/main/java/com/orbitech/npvet/controller/HealthController.java b/src/main/java/com/orbitech/npvet/controller/HealthController.java new file mode 100644 index 0000000..97d1292 --- /dev/null +++ b/src/main/java/com/orbitech/npvet/controller/HealthController.java @@ -0,0 +1,15 @@ +package com.orbitech.npvet.controller; + +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; + +@RequestMapping("/npvet-api/health") +public class HealthController { + + @GetMapping + public ResponseEntity healthCheck() { + return new ResponseEntity<>(HttpStatus.OK); + } +} diff --git a/src/main/java/com/orbitech/npvet/oauth/security/ApplicationSecurityConfig.java b/src/main/java/com/orbitech/npvet/oauth/security/ApplicationSecurityConfig.java index c6f8bec..0a89825 100644 --- a/src/main/java/com/orbitech/npvet/oauth/security/ApplicationSecurityConfig.java +++ b/src/main/java/com/orbitech/npvet/oauth/security/ApplicationSecurityConfig.java @@ -25,10 +25,6 @@ @EnableWebSecurity @AllArgsConstructor public class ApplicationSecurityConfig { - - private static final String[] WHITE_LIST_URL = { - "/npvet/api/auth/**" - }; private final JwtAuthenticationFilter jwtAuthFilter; private final AuthenticationProvider authenticationProvider; private final LogoutHandler logoutHandler; @@ -38,6 +34,7 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti http .csrf(AbstractHttpConfigurer::disable) .authorizeHttpRequests((requests) -> requests + .requestMatchers("/npvet-api/health").permitAll() .requestMatchers("/npvet-api/auth/**").permitAll() .anyRequest().authenticated()) .authenticationProvider(authenticationProvider) From 95440472bfa45807c0b2f04f714a80e45e465a8b Mon Sep 17 00:00:00 2001 From: Vinicius Date: Sun, 27 Apr 2025 19:40:59 -0300 Subject: [PATCH 22/29] fix: Adicionando o @RestController --- .../java/com/orbitech/npvet/controller/HealthController.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/orbitech/npvet/controller/HealthController.java b/src/main/java/com/orbitech/npvet/controller/HealthController.java index 97d1292..efa9b5e 100644 --- a/src/main/java/com/orbitech/npvet/controller/HealthController.java +++ b/src/main/java/com/orbitech/npvet/controller/HealthController.java @@ -4,7 +4,8 @@ import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; - +import org.springframework.web.bind.annotation.RestController; +@RestController @RequestMapping("/npvet-api/health") public class HealthController { From 1cfb4e34ef9d913bec1f224ab1f0043c59c391c2 Mon Sep 17 00:00:00 2001 From: Vinicius Date: Sun, 27 Apr 2025 19:41:49 -0300 Subject: [PATCH 23/29] delete: Removendo o Spring Security temporariamente --- .../security/ApplicationSecurityConfig.java | 51 ++----------------- 1 file changed, 4 insertions(+), 47 deletions(-) diff --git a/src/main/java/com/orbitech/npvet/oauth/security/ApplicationSecurityConfig.java b/src/main/java/com/orbitech/npvet/oauth/security/ApplicationSecurityConfig.java index 0a89825..aa19cd3 100644 --- a/src/main/java/com/orbitech/npvet/oauth/security/ApplicationSecurityConfig.java +++ b/src/main/java/com/orbitech/npvet/oauth/security/ApplicationSecurityConfig.java @@ -1,67 +1,24 @@ package com.orbitech.npvet.oauth.security; -import com.orbitech.npvet.oauth.jwt.JwtAuthenticationFilter; -import lombok.AllArgsConstructor; -import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.security.authentication.AuthenticationProvider; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; -import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.web.SecurityFilterChain; -import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; -import org.springframework.security.web.authentication.logout.LogoutHandler; -import org.springframework.web.cors.CorsConfiguration; -import org.springframework.web.cors.UrlBasedCorsConfigurationSource; -import org.springframework.web.filter.CorsFilter; - -import java.util.Arrays; @Configuration @EnableWebSecurity -@AllArgsConstructor public class ApplicationSecurityConfig { - private final JwtAuthenticationFilter jwtAuthFilter; - private final AuthenticationProvider authenticationProvider; - private final LogoutHandler logoutHandler; @Bean public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { http - .csrf(AbstractHttpConfigurer::disable) - .authorizeHttpRequests((requests) -> requests - .requestMatchers("/npvet-api/health").permitAll() - .requestMatchers("/npvet-api/auth/**").permitAll() - .anyRequest().authenticated()) - .authenticationProvider(authenticationProvider) - .addFilterBefore(jwtAuthFilter, UsernamePasswordAuthenticationFilter.class) - .logout(logout -> - logout.logoutUrl("/npvet-api/logout") - .addLogoutHandler(logoutHandler) - .logoutSuccessHandler((request, response, authentication) -> SecurityContextHolder.clearContext()) - ) - ; - + .csrf(AbstractHttpConfigurer::disable) + .authorizeHttpRequests(requests -> requests + .anyRequest().permitAll()); + return http.build(); } - - @Bean - public FilterRegistrationBean corsFilter() { - UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); - CorsConfiguration config = new CorsConfiguration(); - config.setAllowCredentials(true); - config.addAllowedOriginPattern("*"); - config.setAllowedHeaders(Arrays.asList(HttpHeaders.AUTHORIZATION,HttpHeaders.CONTENT_TYPE,HttpHeaders.ACCEPT, HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); - config.setAllowedMethods(Arrays.asList(HttpMethod.GET.name(),HttpMethod.POST.name(),HttpMethod.PUT.name(),HttpMethod.DELETE.name())); - config.setMaxAge(3600L); - source.registerCorsConfiguration("/**", config); - FilterRegistrationBean bean = new FilterRegistrationBean(new CorsFilter(source)); - bean.setOrder(-102); - return bean; - } } From 42fd3b4ebfea2c84f68782b1b8438d7db76fec03 Mon Sep 17 00:00:00 2001 From: Vinicius Date: Sun, 27 Apr 2025 20:30:31 -0300 Subject: [PATCH 24/29] add: CorsMappings --- .../oauth/security/ApplicationSecurityConfig.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/orbitech/npvet/oauth/security/ApplicationSecurityConfig.java b/src/main/java/com/orbitech/npvet/oauth/security/ApplicationSecurityConfig.java index aa19cd3..347b54e 100644 --- a/src/main/java/com/orbitech/npvet/oauth/security/ApplicationSecurityConfig.java +++ b/src/main/java/com/orbitech/npvet/oauth/security/ApplicationSecurityConfig.java @@ -6,10 +6,12 @@ import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.web.SecurityFilterChain; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @Configuration @EnableWebSecurity -public class ApplicationSecurityConfig { +public class ApplicationSecurityConfig implements WebMvcConfigurer { @Bean public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { @@ -20,5 +22,11 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti return http.build(); } + + @Override + public void addCorsMappings(CorsRegistry registry) { + // Permite todas as origens para todas as rotas + registry.addMapping("/**").allowedOrigins("*"); + } } From 7f4392d5b5be9d012536db47a9080088deeb5fbc Mon Sep 17 00:00:00 2001 From: Vinicius Date: Sun, 27 Apr 2025 21:18:57 -0300 Subject: [PATCH 25/29] feat: Adicionando logs --- .../npvet/controller/HealthController.java | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/orbitech/npvet/controller/HealthController.java b/src/main/java/com/orbitech/npvet/controller/HealthController.java index efa9b5e..ad155c5 100644 --- a/src/main/java/com/orbitech/npvet/controller/HealthController.java +++ b/src/main/java/com/orbitech/npvet/controller/HealthController.java @@ -5,12 +5,29 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j @RestController @RequestMapping("/npvet-api/health") public class HealthController { @GetMapping - public ResponseEntity healthCheck() { - return new ResponseEntity<>(HttpStatus.OK); + public ResponseEntity healthCheck() { + try { + log.info("Health check iniciado"); + log.debug("Verificando status da aplicação"); + + String message = "Aplicação está funcionando normalmente"; + log.info("Health check finalizado com sucesso"); + + return ResponseEntity.ok(message); + } catch (Exception e) { + log.error("Erro crítico durante health check: {}", e.getMessage(), e); + return ResponseEntity + .status(HttpStatus.INTERNAL_SERVER_ERROR) + .body("Erro ao verificar status da aplicação"); + } } } From 7249836f8c5855e46022c88d9cb4236973de06bb Mon Sep 17 00:00:00 2001 From: Vinicius Date: Sun, 27 Apr 2025 22:13:48 -0300 Subject: [PATCH 26/29] Alterando a pipeline temporariamente --- .github/workflows/ci-cd.yml | 102 +++++++----------------------------- 1 file changed, 20 insertions(+), 82 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index bb4dc9d..0fcf099 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -37,25 +37,19 @@ jobs: - name: Checkout de código uses: actions/checkout@v3 - - name: Autenticar com Google Cloud - uses: google-github-actions/auth@v2 + - name: Login no GitHub Container Registry + uses: docker/login-action@v3 with: - credentials_json: ${{ secrets.GCP_SA_KEY }} - - - name: Configurar o SDK do Google Cloud - uses: google-github-actions/setup-gcloud@v2 - with: - project_id: ${{ secrets.GCP_PROJECT_ID }} - - - name: Configurar Docker para usar credenciais do gcloud - run: gcloud auth configure-docker + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build e Push da imagem Docker uses: docker/build-push-action@v4 with: context: . push: true - tags: gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:develop + tags: ghcr.io/${{ github.repository }}:develop build-and-push-main: needs: testes @@ -65,25 +59,21 @@ jobs: - name: Checkout de código uses: actions/checkout@v3 - - name: Autenticar com Google Cloud - uses: google-github-actions/auth@v2 + - name: Login no GitHub Container Registry + uses: docker/login-action@v3 with: - credentials_json: ${{ secrets.GCP_SA_KEY }} - - - name: Configurar o SDK do Google Cloud - uses: google-github-actions/setup-gcloud@v2 - with: - project_id: ${{ secrets.GCP_PROJECT_ID }} - - - name: Configurar Docker para usar credenciais do gcloud - run: gcloud auth configure-docker + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build e Push da imagem Docker uses: docker/build-push-action@v4 with: context: . push: true - tags: gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:latest + tags: | + ghcr.io/${{ github.repository }}:latest + ghcr.io/${{ github.repository }}:${{ github.sha }} build-and-push-staging: needs: testes @@ -93,68 +83,16 @@ jobs: - name: Checkout de código uses: actions/checkout@v3 - - name: Autenticar com Google Cloud - uses: google-github-actions/auth@v2 + - name: Login no GitHub Container Registry + uses: docker/login-action@v3 with: - credentials_json: ${{ secrets.GCP_SA_KEY }} - - - name: Configurar o SDK do Google Cloud - uses: google-github-actions/setup-gcloud@v2 - with: - project_id: ${{ secrets.GCP_PROJECT_ID }} - - - name: Configurar Docker para usar credenciais do gcloud - run: gcloud auth configure-docker + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build e Push da imagem Docker uses: docker/build-push-action@v4 with: context: . push: true - tags: gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:staging - - deploy-main: - needs: build-and-push-main - if: github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - steps: - - name: Autenticar com Google Cloud - uses: google-github-actions/auth@v2 - with: - credentials_json: ${{ secrets.GCP_SA_KEY }} - - - name: Configurar o SDK do Google Cloud - uses: google-github-actions/setup-gcloud@v2 - with: - project_id: ${{ secrets.GCP_PROJECT_ID }} - install_components: "beta" - - - name: Deploy no Cloud Run - run: | - gcloud run deploy npvet-backend \ - --image gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:latest \ - --region us-central1 \ - --platform managed - - deploy-staging: - needs: build-and-push-staging - if: github.ref == 'refs/heads/staging' - runs-on: ubuntu-latest - steps: - - name: Autenticar com Google Cloud - uses: google-github-actions/auth@v2 - with: - credentials_json: ${{ secrets.GCP_SA_KEY }} - - - name: Configurar o SDK do Google Cloud - uses: google-github-actions/setup-gcloud@v2 - with: - project_id: ${{ secrets.GCP_PROJECT_ID }} - install_components: "beta" - - - name: Deploy no Cloud Run - run: | - gcloud run deploy npvet-backend-staging \ - --image gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:staging \ - --region us-central1 \ - --platform managed + tags: ghcr.io/${{ github.repository }}:staging From c338e66cea32b4af31b4c0a7744f90b3f827b7a8 Mon Sep 17 00:00:00 2001 From: Vinicius Date: Sun, 27 Apr 2025 22:17:30 -0300 Subject: [PATCH 27/29] Removendo o uppercase --- .github/workflows/ci-cd.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 0fcf099..4faf634 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -49,7 +49,7 @@ jobs: with: context: . push: true - tags: ghcr.io/${{ github.repository }}:develop + tags: ghcr.io/orbitechz/npvet-backend-cloud:develop build-and-push-main: needs: testes @@ -72,8 +72,8 @@ jobs: context: . push: true tags: | - ghcr.io/${{ github.repository }}:latest - ghcr.io/${{ github.repository }}:${{ github.sha }} + ghcr.io/orbitechz/npvet-backend-cloud:latest + ghcr.io/orbitechz/npvet-backend-cloud:${{ github.sha }} build-and-push-staging: needs: testes @@ -95,4 +95,4 @@ jobs: with: context: . push: true - tags: ghcr.io/${{ github.repository }}:staging + tags: ghcr.io/orbitechz/npvet-backend-cloud:staging From 4d82fc9fdef6fc0d0ee404b56a2d7aae2cd47d37 Mon Sep 17 00:00:00 2001 From: Vinicius Date: Tue, 6 May 2025 20:25:15 -0300 Subject: [PATCH 28/29] fix: Voltando com o Security --- .github/workflows/ci-cd.yml | 102 ++++-------------- .../npvet/controller/HealthController.java | 21 +++- .../security/ApplicationSecurityConfig.java | 57 ++-------- 3 files changed, 50 insertions(+), 130 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index bb4dc9d..4faf634 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -37,25 +37,19 @@ jobs: - name: Checkout de código uses: actions/checkout@v3 - - name: Autenticar com Google Cloud - uses: google-github-actions/auth@v2 + - name: Login no GitHub Container Registry + uses: docker/login-action@v3 with: - credentials_json: ${{ secrets.GCP_SA_KEY }} - - - name: Configurar o SDK do Google Cloud - uses: google-github-actions/setup-gcloud@v2 - with: - project_id: ${{ secrets.GCP_PROJECT_ID }} - - - name: Configurar Docker para usar credenciais do gcloud - run: gcloud auth configure-docker + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build e Push da imagem Docker uses: docker/build-push-action@v4 with: context: . push: true - tags: gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:develop + tags: ghcr.io/orbitechz/npvet-backend-cloud:develop build-and-push-main: needs: testes @@ -65,25 +59,21 @@ jobs: - name: Checkout de código uses: actions/checkout@v3 - - name: Autenticar com Google Cloud - uses: google-github-actions/auth@v2 + - name: Login no GitHub Container Registry + uses: docker/login-action@v3 with: - credentials_json: ${{ secrets.GCP_SA_KEY }} - - - name: Configurar o SDK do Google Cloud - uses: google-github-actions/setup-gcloud@v2 - with: - project_id: ${{ secrets.GCP_PROJECT_ID }} - - - name: Configurar Docker para usar credenciais do gcloud - run: gcloud auth configure-docker + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build e Push da imagem Docker uses: docker/build-push-action@v4 with: context: . push: true - tags: gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:latest + tags: | + ghcr.io/orbitechz/npvet-backend-cloud:latest + ghcr.io/orbitechz/npvet-backend-cloud:${{ github.sha }} build-and-push-staging: needs: testes @@ -93,68 +83,16 @@ jobs: - name: Checkout de código uses: actions/checkout@v3 - - name: Autenticar com Google Cloud - uses: google-github-actions/auth@v2 + - name: Login no GitHub Container Registry + uses: docker/login-action@v3 with: - credentials_json: ${{ secrets.GCP_SA_KEY }} - - - name: Configurar o SDK do Google Cloud - uses: google-github-actions/setup-gcloud@v2 - with: - project_id: ${{ secrets.GCP_PROJECT_ID }} - - - name: Configurar Docker para usar credenciais do gcloud - run: gcloud auth configure-docker + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build e Push da imagem Docker uses: docker/build-push-action@v4 with: context: . push: true - tags: gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:staging - - deploy-main: - needs: build-and-push-main - if: github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - steps: - - name: Autenticar com Google Cloud - uses: google-github-actions/auth@v2 - with: - credentials_json: ${{ secrets.GCP_SA_KEY }} - - - name: Configurar o SDK do Google Cloud - uses: google-github-actions/setup-gcloud@v2 - with: - project_id: ${{ secrets.GCP_PROJECT_ID }} - install_components: "beta" - - - name: Deploy no Cloud Run - run: | - gcloud run deploy npvet-backend \ - --image gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:latest \ - --region us-central1 \ - --platform managed - - deploy-staging: - needs: build-and-push-staging - if: github.ref == 'refs/heads/staging' - runs-on: ubuntu-latest - steps: - - name: Autenticar com Google Cloud - uses: google-github-actions/auth@v2 - with: - credentials_json: ${{ secrets.GCP_SA_KEY }} - - - name: Configurar o SDK do Google Cloud - uses: google-github-actions/setup-gcloud@v2 - with: - project_id: ${{ secrets.GCP_PROJECT_ID }} - install_components: "beta" - - - name: Deploy no Cloud Run - run: | - gcloud run deploy npvet-backend-staging \ - --image gcr.io/${{ secrets.GCP_PROJECT_ID }}/npvet-backend:staging \ - --region us-central1 \ - --platform managed + tags: ghcr.io/orbitechz/npvet-backend-cloud:staging diff --git a/src/main/java/com/orbitech/npvet/controller/HealthController.java b/src/main/java/com/orbitech/npvet/controller/HealthController.java index efa9b5e..ad155c5 100644 --- a/src/main/java/com/orbitech/npvet/controller/HealthController.java +++ b/src/main/java/com/orbitech/npvet/controller/HealthController.java @@ -5,12 +5,29 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; + +import lombok.extern.slf4j.Slf4j; + +@Slf4j @RestController @RequestMapping("/npvet-api/health") public class HealthController { @GetMapping - public ResponseEntity healthCheck() { - return new ResponseEntity<>(HttpStatus.OK); + public ResponseEntity healthCheck() { + try { + log.info("Health check iniciado"); + log.debug("Verificando status da aplicação"); + + String message = "Aplicação está funcionando normalmente"; + log.info("Health check finalizado com sucesso"); + + return ResponseEntity.ok(message); + } catch (Exception e) { + log.error("Erro crítico durante health check: {}", e.getMessage(), e); + return ResponseEntity + .status(HttpStatus.INTERNAL_SERVER_ERROR) + .body("Erro ao verificar status da aplicação"); + } } } diff --git a/src/main/java/com/orbitech/npvet/oauth/security/ApplicationSecurityConfig.java b/src/main/java/com/orbitech/npvet/oauth/security/ApplicationSecurityConfig.java index 0a89825..347b54e 100644 --- a/src/main/java/com/orbitech/npvet/oauth/security/ApplicationSecurityConfig.java +++ b/src/main/java/com/orbitech/npvet/oauth/security/ApplicationSecurityConfig.java @@ -1,67 +1,32 @@ package com.orbitech.npvet.oauth.security; -import com.orbitech.npvet.oauth.jwt.JwtAuthenticationFilter; -import lombok.AllArgsConstructor; -import org.springframework.boot.web.servlet.FilterRegistrationBean; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.security.authentication.AuthenticationProvider; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; -import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.web.SecurityFilterChain; -import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter; -import org.springframework.security.web.authentication.logout.LogoutHandler; -import org.springframework.web.cors.CorsConfiguration; -import org.springframework.web.cors.UrlBasedCorsConfigurationSource; -import org.springframework.web.filter.CorsFilter; - -import java.util.Arrays; +import org.springframework.web.servlet.config.annotation.CorsRegistry; +import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @Configuration @EnableWebSecurity -@AllArgsConstructor -public class ApplicationSecurityConfig { - private final JwtAuthenticationFilter jwtAuthFilter; - private final AuthenticationProvider authenticationProvider; - private final LogoutHandler logoutHandler; +public class ApplicationSecurityConfig implements WebMvcConfigurer { @Bean public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Exception { http - .csrf(AbstractHttpConfigurer::disable) - .authorizeHttpRequests((requests) -> requests - .requestMatchers("/npvet-api/health").permitAll() - .requestMatchers("/npvet-api/auth/**").permitAll() - .anyRequest().authenticated()) - .authenticationProvider(authenticationProvider) - .addFilterBefore(jwtAuthFilter, UsernamePasswordAuthenticationFilter.class) - .logout(logout -> - logout.logoutUrl("/npvet-api/logout") - .addLogoutHandler(logoutHandler) - .logoutSuccessHandler((request, response, authentication) -> SecurityContextHolder.clearContext()) - ) - ; - + .csrf(AbstractHttpConfigurer::disable) + .authorizeHttpRequests(requests -> requests + .anyRequest().permitAll()); + return http.build(); } - @Bean - public FilterRegistrationBean corsFilter() { - UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); - CorsConfiguration config = new CorsConfiguration(); - config.setAllowCredentials(true); - config.addAllowedOriginPattern("*"); - config.setAllowedHeaders(Arrays.asList(HttpHeaders.AUTHORIZATION,HttpHeaders.CONTENT_TYPE,HttpHeaders.ACCEPT, HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN)); - config.setAllowedMethods(Arrays.asList(HttpMethod.GET.name(),HttpMethod.POST.name(),HttpMethod.PUT.name(),HttpMethod.DELETE.name())); - config.setMaxAge(3600L); - source.registerCorsConfiguration("/**", config); - FilterRegistrationBean bean = new FilterRegistrationBean(new CorsFilter(source)); - bean.setOrder(-102); - return bean; + @Override + public void addCorsMappings(CorsRegistry registry) { + // Permite todas as origens para todas as rotas + registry.addMapping("/**").allowedOrigins("*"); } } From 26fd7df32fe2d0685356d9d108d2adf937d7fe65 Mon Sep 17 00:00:00 2001 From: Piegat Date: Wed, 7 May 2025 19:58:33 -0300 Subject: [PATCH 29/29] delete logs.log e adicionado no gitignore --- .gitignore | 5 +- logs.log | 569 ----------------------------------------------------- 2 files changed, 4 insertions(+), 570 deletions(-) delete mode 100644 logs.log diff --git a/.gitignore b/.gitignore index 9b34ec5..b8c7fb6 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,7 @@ build/ .vscode/ ## Ambiente local ## -.env \ No newline at end of file +.env + +*.gz +logs.log \ No newline at end of file diff --git a/logs.log b/logs.log deleted file mode 100644 index d113c8a..0000000 --- a/logs.log +++ /dev/null @@ -1,569 +0,0 @@ -2025-04-15T17:25:02.847-03:00 INFO 7044 --- [main] com.orbitech.npvet.NpvetApplication : Starting NpvetApplication using Java 23.0.2 with PID 7044 (C:\Users\gusta\OneDrive\Documentos\projects\NPVet-Backend-Cloud\target\classes started by gusta in C:\Users\gusta\OneDrive\Documentos\projects\NPVet-Backend-Cloud) -2025-04-15T17:25:02.850-03:00 INFO 7044 --- [main] com.orbitech.npvet.NpvetApplication : No active profile set, falling back to 1 default profile: "default" -2025-04-15T17:25:04.513-03:00 INFO 7044 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. -2025-04-15T17:25:04.613-03:00 INFO 7044 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 89 ms. Found 11 JPA repository interfaces. -2025-04-15T17:25:05.322-03:00 INFO 7044 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) -2025-04-15T17:25:05.333-03:00 INFO 7044 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] -2025-04-15T17:25:05.333-03:00 INFO 7044 --- [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.12] -2025-04-15T17:25:05.427-03:00 INFO 7044 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext -2025-04-15T17:25:05.428-03:00 INFO 7044 --- [main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2514 ms -2025-04-15T17:25:05.595-03:00 INFO 7044 --- [main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] -2025-04-15T17:25:05.669-03:00 INFO 7044 --- [main] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.2.7.Final -2025-04-15T17:25:05.672-03:00 INFO 7044 --- [main] org.hibernate.cfg.Environment : HHH000406: Using bytecode reflection optimizer -2025-04-15T17:25:05.864-03:00 INFO 7044 --- [main] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy -2025-04-15T17:25:06.045-03:00 INFO 7044 --- [main] o.s.o.j.p.SpringPersistenceUnitInfo : No LoadTimeWeaver setup: ignoring JPA class transformer -2025-04-15T17:25:06.067-03:00 INFO 7044 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... -2025-04-15T17:25:06.424-03:00 INFO 7044 --- [main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@49190ed6 -2025-04-15T17:25:06.427-03:00 INFO 7044 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. -2025-04-15T17:25:06.944-03:00 INFO 7044 --- [main] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy -2025-04-15T17:25:08.009-03:00 INFO 7044 --- [main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] -2025-04-15T17:25:08.083-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:25:08.084-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkryqhlmk35ogpp3jxx4rh68yk6 em tabela anamneses_anamnese_perguntas -2025-04-15T17:25:08.088-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:25:08.088-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkj180gtcsb792u2fk8bv1ritss em tabela anamneses_historico_progresso_medico -2025-04-15T17:25:08.095-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:25:08.095-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata outros 2 objetos -2025-04-15T17:25:08.103-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:25:08.104-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkooe7ghmjfibiiiaeumgu4lrr9 em tabela usuario_consultas -2025-04-15T17:25:08.109-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:25:08.109-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkp9adf0r99ppueo26leonkk3dj em tabela tutor_contato -2025-04-15T17:25:08.113-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:25:08.114-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkntx5ttgu7xkuccjc0upkfxvbg em tabela tutor_endereco -2025-04-15T17:25:08.127-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:25:08.127-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata outros 2 objetos -2025-04-15T17:25:08.136-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:25:08.136-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata outros 2 objetos -2025-04-15T17:25:08.142-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:25:08.142-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkryqhlmk35ogpp3jxx4rh68yk6" da relação "anamneses_anamnese_perguntas" não existe, ignorando -2025-04-15T17:25:08.144-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:25:08.144-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkn181obfnf7s68nnoj6r159a67" da relação "anamneses_anamnese_perguntas" não existe, ignorando -2025-04-15T17:25:08.145-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:25:08.145-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkj180gtcsb792u2fk8bv1ritss" da relação "anamneses_historico_progresso_medico" não existe, ignorando -2025-04-15T17:25:08.146-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:25:08.146-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fk2wdtp4d1fp3plwa1irevgxxth" da relação "anamneses_historico_progresso_medico" não existe, ignorando -2025-04-15T17:25:08.147-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:25:08.147-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fk5kj7c5g7y3kfcrm7bx8e30qod" da relação "token" não existe, ignorando -2025-04-15T17:25:08.148-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:25:08.148-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkp9adf0r99ppueo26leonkk3dj" da relação "tutor_contato" não existe, ignorando -2025-04-15T17:25:08.149-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:25:08.149-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkpkk8cikgtskg8dasw3tshtg02" da relação "tutor_contato" não existe, ignorando -2025-04-15T17:25:08.149-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:25:08.149-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkntx5ttgu7xkuccjc0upkfxvbg" da relação "tutor_endereco" não existe, ignorando -2025-04-15T17:25:08.150-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:25:08.150-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkpuwl7gfirj9402n0g37q50v98" da relação "tutor_endereco" não existe, ignorando -2025-04-15T17:25:08.151-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:25:08.151-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkooe7ghmjfibiiiaeumgu4lrr9" da relação "usuario_consultas" não existe, ignorando -2025-04-15T17:25:08.152-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:25:08.152-03:00 WARN 7044 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkbfa7h15o0v6bdi8cfhediah0i" da relação "usuario_consultas" não existe, ignorando -2025-04-15T17:25:08.455-03:00 INFO 7044 --- [main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' -2025-04-15T17:25:08.819-03:00 INFO 7044 --- [main] o.s.d.j.r.query.QueryEnhancerFactory : Hibernate is in classpath; If applicable, HQL parser will be used. -2025-04-15T17:25:09.897-03:00 WARN 7044 --- [main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning -2025-04-15T17:25:10.156-03:00 INFO 7044 --- [main] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@4ca87dbe, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@2eeee108, org.springframework.security.web.context.SecurityContextHolderFilter@632f505b, org.springframework.security.web.header.HeaderWriterFilter@2c969f, org.springframework.security.web.authentication.logout.LogoutFilter@54214c34, com.orbitech.npvet.oauth.jwt.JwtAuthenticationFilter@61d1315b, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@19b656b0, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@1c6d908b, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@7c1aed5a, org.springframework.security.web.access.ExceptionTranslationFilter@10f535a6, org.springframework.security.web.access.intercept.AuthorizationFilter@32c3102] -2025-04-15T17:25:10.418-03:00 INFO 7044 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path '' -2025-04-15T17:25:10.424-03:00 INFO 7044 --- [main] com.orbitech.npvet.NpvetApplication : Started NpvetApplication in 8.074 seconds (process running for 10.241) -2025-04-15T17:25:23.644-03:00 INFO 7044 --- [http-nio-8080-exec-2] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet' -2025-04-15T17:25:23.644-03:00 INFO 7044 --- [http-nio-8080-exec-2] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet' -2025-04-15T17:25:23.646-03:00 INFO 7044 --- [http-nio-8080-exec-2] o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms -2025-04-15T17:25:52.545-03:00 WARN 7044 --- [http-nio-8080-exec-7] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Error: 0, SQLState: 22001 -2025-04-15T17:25:52.545-03:00 ERROR 7044 --- [http-nio-8080-exec-7] o.h.engine.jdbc.spi.SqlExceptionHelper : ERRO: valor é muito longo para tipo character varying(11) -2025-04-15T17:25:52.555-03:00 ERROR 7044 --- [http-nio-8080-exec-7] c.o.npvet.config.GlobalErrorHandler : OCORREU UM ERRO Exception: could not execute statement [ERRO: valor é muito longo para tipo character varying(11)] [insert into public.usuario (cpf,created_at,deleted_at,nome,password,role,updated_at,username) values (?,?,?,?,?,?,?,?)]; SQL [insert into public.usuario (cpf,created_at,deleted_at,nome,password,role,updated_at,username) values (?,?,?,?,?,?,?,?)] -2025-04-15T17:26:04.422-03:00 INFO 7044 --- [http-nio-8080-exec-10] c.orbitech.npvet.service.UsuarioService : USUÁRIO:teteNOME:teteUSERNAME:teteCPF:16076125004| Criado por:test2e 1 -2025-04-15T17:26:26.396-03:00 INFO 7044 --- [SpringApplicationShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' -2025-04-15T17:26:26.418-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:26.418-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkryqhlmk35ogpp3jxx4rh68yk6 em tabela anamneses_anamnese_perguntas -2025-04-15T17:26:26.422-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:26.423-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkj180gtcsb792u2fk8bv1ritss em tabela anamneses_historico_progresso_medico -2025-04-15T17:26:26.430-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:26.430-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata outros 2 objetos -2025-04-15T17:26:26.440-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:26.442-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkooe7ghmjfibiiiaeumgu4lrr9 em tabela usuario_consultas -2025-04-15T17:26:26.446-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:26.446-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkp9adf0r99ppueo26leonkk3dj em tabela tutor_contato -2025-04-15T17:26:26.452-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:26.452-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkntx5ttgu7xkuccjc0upkfxvbg em tabela tutor_endereco -2025-04-15T17:26:26.476-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:26.476-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata outros 2 objetos -2025-04-15T17:26:26.486-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:26.487-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata outros 2 objetos -2025-04-15T17:26:26.492-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:26.492-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkryqhlmk35ogpp3jxx4rh68yk6" da relação "anamneses_anamnese_perguntas" não existe, ignorando -2025-04-15T17:26:26.494-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:26.494-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkn181obfnf7s68nnoj6r159a67" da relação "anamneses_anamnese_perguntas" não existe, ignorando -2025-04-15T17:26:26.495-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:26.496-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkj180gtcsb792u2fk8bv1ritss" da relação "anamneses_historico_progresso_medico" não existe, ignorando -2025-04-15T17:26:26.497-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:26.497-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fk2wdtp4d1fp3plwa1irevgxxth" da relação "anamneses_historico_progresso_medico" não existe, ignorando -2025-04-15T17:26:26.498-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:26.499-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fk5kj7c5g7y3kfcrm7bx8e30qod" da relação "token" não existe, ignorando -2025-04-15T17:26:26.500-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:26.500-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkp9adf0r99ppueo26leonkk3dj" da relação "tutor_contato" não existe, ignorando -2025-04-15T17:26:26.501-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:26.501-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkpkk8cikgtskg8dasw3tshtg02" da relação "tutor_contato" não existe, ignorando -2025-04-15T17:26:26.503-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:26.503-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkntx5ttgu7xkuccjc0upkfxvbg" da relação "tutor_endereco" não existe, ignorando -2025-04-15T17:26:26.504-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:26.505-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkpuwl7gfirj9402n0g37q50v98" da relação "tutor_endereco" não existe, ignorando -2025-04-15T17:26:26.506-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:26.506-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkooe7ghmjfibiiiaeumgu4lrr9" da relação "usuario_consultas" não existe, ignorando -2025-04-15T17:26:26.508-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:26.508-03:00 WARN 7044 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkbfa7h15o0v6bdi8cfhediah0i" da relação "usuario_consultas" não existe, ignorando -2025-04-15T17:26:26.530-03:00 INFO 7044 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... -2025-04-15T17:26:26.532-03:00 INFO 7044 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. -2025-04-15T17:26:38.647-03:00 INFO 14724 --- [main] com.orbitech.npvet.NpvetApplication : Starting NpvetApplication using Java 23.0.2 with PID 14724 (C:\Users\gusta\OneDrive\Documentos\projects\NPVet-Backend-Cloud\target\classes started by gusta in C:\Users\gusta\OneDrive\Documentos\projects\NPVet-Backend-Cloud) -2025-04-15T17:26:38.649-03:00 INFO 14724 --- [main] com.orbitech.npvet.NpvetApplication : No active profile set, falling back to 1 default profile: "default" -2025-04-15T17:26:39.587-03:00 INFO 14724 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. -2025-04-15T17:26:39.672-03:00 INFO 14724 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 78 ms. Found 11 JPA repository interfaces. -2025-04-15T17:26:40.263-03:00 INFO 14724 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http) -2025-04-15T17:26:40.271-03:00 INFO 14724 --- [main] o.apache.catalina.core.StandardService : Starting service [Tomcat] -2025-04-15T17:26:40.271-03:00 INFO 14724 --- [main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.12] -2025-04-15T17:26:40.354-03:00 INFO 14724 --- [main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext -2025-04-15T17:26:40.355-03:00 INFO 14724 --- [main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1642 ms -2025-04-15T17:26:40.475-03:00 INFO 14724 --- [main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] -2025-04-15T17:26:40.531-03:00 INFO 14724 --- [main] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.2.7.Final -2025-04-15T17:26:40.534-03:00 INFO 14724 --- [main] org.hibernate.cfg.Environment : HHH000406: Using bytecode reflection optimizer -2025-04-15T17:26:40.649-03:00 INFO 14724 --- [main] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy -2025-04-15T17:26:40.781-03:00 INFO 14724 --- [main] o.s.o.j.p.SpringPersistenceUnitInfo : No LoadTimeWeaver setup: ignoring JPA class transformer -2025-04-15T17:26:40.796-03:00 INFO 14724 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... -2025-04-15T17:26:40.968-03:00 INFO 14724 --- [main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@3303e89e -2025-04-15T17:26:40.970-03:00 INFO 14724 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. -2025-04-15T17:26:41.367-03:00 INFO 14724 --- [main] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy -2025-04-15T17:26:42.271-03:00 INFO 14724 --- [main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] -2025-04-15T17:26:42.287-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.287-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "anamneses" não existe, ignorando -2025-04-15T17:26:42.288-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.288-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "anamneses" não existe, ignorando -2025-04-15T17:26:42.289-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.289-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "anamneses" não existe, ignorando -2025-04-15T17:26:42.290-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.290-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "animal" não existe, ignorando -2025-04-15T17:26:42.290-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.290-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "consulta" não existe, ignorando -2025-04-15T17:26:42.291-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.291-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "consulta" não existe, ignorando -2025-04-15T17:26:42.292-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.292-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "consulta" não existe, ignorando -2025-04-15T17:26:42.294-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.294-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "consulta" não existe, ignorando -2025-04-15T17:26:42.294-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.295-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "exame_fisico" não existe, ignorando -2025-04-15T17:26:42.296-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.296-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "exame_fisico" não existe, ignorando -2025-04-15T17:26:42.297-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.297-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "vacina" não existe, ignorando -2025-04-15T17:26:42.298-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.299-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "anamnese-pergunta" não existe, ignorando -2025-04-15T17:26:42.300-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.300-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "anamnese_historico" não existe, ignorando -2025-04-15T17:26:42.301-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.301-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "anamneses" não existe, ignorando -2025-04-15T17:26:42.302-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.302-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "animal" não existe, ignorando -2025-04-15T17:26:42.302-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.302-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "consulta" não existe, ignorando -2025-04-15T17:26:42.303-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.303-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "contato" não existe, ignorando -2025-04-15T17:26:42.303-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.303-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "endereco" não existe, ignorando -2025-04-15T17:26:42.304-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.304-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "exame_fisico" não existe, ignorando -2025-04-15T17:26:42.304-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.304-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "perguntas" não existe, ignorando -2025-04-15T17:26:42.304-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.305-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "tutor" não existe, ignorando -2025-04-15T17:26:42.305-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.305-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "usuario" não existe, ignorando -2025-04-15T17:26:42.306-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.306-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "vacina" não existe, ignorando -2025-04-15T17:26:42.307-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.307-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "anamneses_anamnese_perguntas" não existe, ignorando -2025-04-15T17:26:42.307-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.307-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "anamneses_anamnese_perguntas" não existe, ignorando -2025-04-15T17:26:42.308-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.308-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "anamneses_historico_progresso_medico" não existe, ignorando -2025-04-15T17:26:42.309-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.309-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "anamneses_historico_progresso_medico" não existe, ignorando -2025-04-15T17:26:42.309-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.309-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "token" não existe, ignorando -2025-04-15T17:26:42.310-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.310-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "tutor_contato" não existe, ignorando -2025-04-15T17:26:42.311-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.311-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "tutor_contato" não existe, ignorando -2025-04-15T17:26:42.311-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.311-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "tutor_endereco" não existe, ignorando -2025-04-15T17:26:42.312-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.312-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "tutor_endereco" não existe, ignorando -2025-04-15T17:26:42.312-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.312-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "usuario_consultas" não existe, ignorando -2025-04-15T17:26:42.313-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.314-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relação "usuario_consultas" não existe, ignorando -2025-04-15T17:26:42.314-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.314-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "anamneses_anamnese_perguntas" não existe, ignorando -2025-04-15T17:26:42.315-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.316-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "anamneses_historico_progresso_medico" não existe, ignorando -2025-04-15T17:26:42.317-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.317-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "token" não existe, ignorando -2025-04-15T17:26:42.318-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.318-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "tutor_contato" não existe, ignorando -2025-04-15T17:26:42.318-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.319-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "tutor_endereco" não existe, ignorando -2025-04-15T17:26:42.319-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.319-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : tabela "usuario_consultas" não existe, ignorando -2025-04-15T17:26:42.320-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:26:42.321-03:00 WARN 14724 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : sequência "token_seq" não existe, ignorando -2025-04-15T17:26:42.535-03:00 INFO 14724 --- [main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' -2025-04-15T17:26:42.862-03:00 INFO 14724 --- [main] o.s.d.j.r.query.QueryEnhancerFactory : Hibernate is in classpath; If applicable, HQL parser will be used. -2025-04-15T17:26:43.929-03:00 WARN 14724 --- [main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning -2025-04-15T17:26:44.210-03:00 INFO 14724 --- [main] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@7e78953e, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@78e8594a, org.springframework.security.web.context.SecurityContextHolderFilter@2fc2305a, org.springframework.security.web.header.HeaderWriterFilter@5d40034e, org.springframework.security.web.authentication.logout.LogoutFilter@7aab77f, com.orbitech.npvet.oauth.jwt.JwtAuthenticationFilter@60a3a0fa, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@5e5e680b, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@45cee4d2, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@51b274ce, org.springframework.security.web.access.ExceptionTranslationFilter@b359d2d, org.springframework.security.web.access.intercept.AuthorizationFilter@4b39b5fe] -2025-04-15T17:26:44.488-03:00 INFO 14724 --- [main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path '' -2025-04-15T17:26:44.496-03:00 INFO 14724 --- [main] com.orbitech.npvet.NpvetApplication : Started NpvetApplication in 6.268 seconds (process running for 7.829) -2025-04-15T17:26:48.477-03:00 INFO 14724 --- [http-nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet' -2025-04-15T17:26:48.478-03:00 INFO 14724 --- [http-nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet' -2025-04-15T17:26:48.480-03:00 INFO 14724 --- [http-nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : Completed initialization in 2 ms -2025-04-15T17:26:48.765-03:00 ERROR 14724 --- [http-nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception - -org.springframework.security.core.userdetails.UsernameNotFoundException: User not found - at com.orbitech.npvet.oauth.security.ApplicationConfig.lambda$userDetailsService$0(ApplicationConfig.java:25) ~[classes/:na] - at java.base/java.util.Optional.orElseThrow(Optional.java:403) ~[na:na] - at com.orbitech.npvet.oauth.security.ApplicationConfig.lambda$userDetailsService$1(ApplicationConfig.java:25) ~[classes/:na] - at com.orbitech.npvet.oauth.jwt.JwtAuthenticationFilter.doFilterInternal(JwtAuthenticationFilter.java:48) ~[classes/:na] - at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] - at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] - at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:82) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:69) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] - at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] - at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:233) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:191) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:352) ~[spring-web-6.0.11.jar:6.0.11] - at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:268) ~[spring-web-6.0.11.jar:6.0.11] - at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91) ~[spring-web-6.0.11.jar:6.0.11] - at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] - at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-6.0.11.jar:6.0.11] - at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] - at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-6.0.11.jar:6.0.11] - at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] - at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-6.0.11.jar:6.0.11] - at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] - at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:166) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:738) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:894) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1740) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at java.base/java.lang.Thread.run(Thread.java:1575) ~[na:na] - -2025-04-15T17:27:02.338-03:00 ERROR 14724 --- [http-nio-8080-exec-5] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception - -org.springframework.security.core.userdetails.UsernameNotFoundException: User not found - at com.orbitech.npvet.oauth.security.ApplicationConfig.lambda$userDetailsService$0(ApplicationConfig.java:25) ~[classes/:na] - at java.base/java.util.Optional.orElseThrow(Optional.java:403) ~[na:na] - at com.orbitech.npvet.oauth.security.ApplicationConfig.lambda$userDetailsService$1(ApplicationConfig.java:25) ~[classes/:na] - at com.orbitech.npvet.oauth.jwt.JwtAuthenticationFilter.doFilterInternal(JwtAuthenticationFilter.java:48) ~[classes/:na] - at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] - at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] - at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:82) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:69) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] - at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] - at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:233) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:191) ~[spring-security-web-6.1.3.jar:6.1.3] - at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:352) ~[spring-web-6.0.11.jar:6.0.11] - at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:268) ~[spring-web-6.0.11.jar:6.0.11] - at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91) ~[spring-web-6.0.11.jar:6.0.11] - at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] - at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100) ~[spring-web-6.0.11.jar:6.0.11] - at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] - at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93) ~[spring-web-6.0.11.jar:6.0.11] - at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] - at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201) ~[spring-web-6.0.11.jar:6.0.11] - at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116) ~[spring-web-6.0.11.jar:6.0.11] - at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:174) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:149) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:166) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.valves.RemoteIpValve.invoke(RemoteIpValve.java:738) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:341) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:391) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:894) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1740) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) ~[tomcat-embed-core-10.1.12.jar:10.1.12] - at java.base/java.lang.Thread.run(Thread.java:1575) ~[na:na] - -2025-04-15T17:27:28.871-03:00 INFO 14724 --- [http-nio-8080-exec-9] c.orbitech.npvet.service.UsuarioService : USUÁRIO:teteNOME:teteUSERNAME:teteCPF:160.761.250-04| Criado por:test2e 1 -2025-04-15T17:27:32.570-03:00 INFO 14724 --- [SpringApplicationShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' -2025-04-15T17:27:32.598-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:27:32.598-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkryqhlmk35ogpp3jxx4rh68yk6 em tabela anamneses_anamnese_perguntas -2025-04-15T17:27:32.602-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:27:32.602-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkj180gtcsb792u2fk8bv1ritss em tabela anamneses_historico_progresso_medico -2025-04-15T17:27:32.608-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:27:32.608-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata outros 2 objetos -2025-04-15T17:27:32.618-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:27:32.618-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkooe7ghmjfibiiiaeumgu4lrr9 em tabela usuario_consultas -2025-04-15T17:27:32.622-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:27:32.622-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkp9adf0r99ppueo26leonkk3dj em tabela tutor_contato -2025-04-15T17:27:32.628-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:27:32.628-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata restrição fkntx5ttgu7xkuccjc0upkfxvbg em tabela tutor_endereco -2025-04-15T17:27:32.646-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:27:32.646-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata outros 2 objetos -2025-04-15T17:27:32.657-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:27:32.658-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : removendo em cascata outros 2 objetos -2025-04-15T17:27:32.664-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:27:32.664-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkryqhlmk35ogpp3jxx4rh68yk6" da relação "anamneses_anamnese_perguntas" não existe, ignorando -2025-04-15T17:27:32.665-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:27:32.665-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkn181obfnf7s68nnoj6r159a67" da relação "anamneses_anamnese_perguntas" não existe, ignorando -2025-04-15T17:27:32.666-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:27:32.666-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkj180gtcsb792u2fk8bv1ritss" da relação "anamneses_historico_progresso_medico" não existe, ignorando -2025-04-15T17:27:32.667-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:27:32.667-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fk2wdtp4d1fp3plwa1irevgxxth" da relação "anamneses_historico_progresso_medico" não existe, ignorando -2025-04-15T17:27:32.668-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:27:32.668-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fk5kj7c5g7y3kfcrm7bx8e30qod" da relação "token" não existe, ignorando -2025-04-15T17:27:32.669-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:27:32.669-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkp9adf0r99ppueo26leonkk3dj" da relação "tutor_contato" não existe, ignorando -2025-04-15T17:27:32.670-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:27:32.670-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkpkk8cikgtskg8dasw3tshtg02" da relação "tutor_contato" não existe, ignorando -2025-04-15T17:27:32.671-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:27:32.671-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkntx5ttgu7xkuccjc0upkfxvbg" da relação "tutor_endereco" não existe, ignorando -2025-04-15T17:27:32.672-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:27:32.672-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkpuwl7gfirj9402n0g37q50v98" da relação "tutor_endereco" não existe, ignorando -2025-04-15T17:27:32.672-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:27:32.674-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkooe7ghmjfibiiiaeumgu4lrr9" da relação "usuario_consultas" não existe, ignorando -2025-04-15T17:27:32.676-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T17:27:32.676-03:00 WARN 14724 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : restrição "fkbfa7h15o0v6bdi8cfhediah0i" da relação "usuario_consultas" não existe, ignorando -2025-04-15T17:27:32.701-03:00 INFO 14724 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... -2025-04-15T17:27:32.706-03:00 INFO 14724 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. -2025-04-15T19:39:40.888-03:00 INFO 7427 --- [main] c.o.npvet.EntityTest.PerguntaTest : Starting PerguntaTest using Java 17.0.14 with PID 7427 (started by gustavo_parquetec in /home/gustavo_parquetec/Documentos/faculdade/NPVet-Backend-Cloud) -2025-04-15T19:39:40.889-03:00 INFO 7427 --- [main] c.o.npvet.EntityTest.PerguntaTest : No active profile set, falling back to 1 default profile: "default" -2025-04-15T19:39:41.221-03:00 INFO 7427 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. -2025-04-15T19:39:41.258-03:00 INFO 7427 --- [main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 33 ms. Found 11 JPA repository interfaces. -2025-04-15T19:39:41.551-03:00 INFO 7427 --- [main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] -2025-04-15T19:39:41.577-03:00 INFO 7427 --- [main] org.hibernate.Version : HHH000412: Hibernate ORM core version 6.2.7.Final -2025-04-15T19:39:41.578-03:00 INFO 7427 --- [main] org.hibernate.cfg.Environment : HHH000406: Using bytecode reflection optimizer -2025-04-15T19:39:41.641-03:00 INFO 7427 --- [main] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy -2025-04-15T19:39:41.702-03:00 INFO 7427 --- [main] o.s.o.j.p.SpringPersistenceUnitInfo : No LoadTimeWeaver setup: ignoring JPA class transformer -2025-04-15T19:39:41.720-03:00 INFO 7427 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... -2025-04-15T19:39:41.829-03:00 INFO 7427 --- [main] com.zaxxer.hikari.pool.HikariPool : HikariPool-1 - Added connection org.postgresql.jdbc.PgConnection@bd4ee01 -2025-04-15T19:39:41.830-03:00 INFO 7427 --- [main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. -2025-04-15T19:39:42.016-03:00 INFO 7427 --- [main] o.h.b.i.BytecodeProviderInitiator : HHH000021: Bytecode provider name : bytebuddy -2025-04-15T19:39:42.517-03:00 INFO 7427 --- [main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] -2025-04-15T19:39:42.526-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.527-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses" does not exist, skipping -2025-04-15T19:39:42.527-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.527-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses" does not exist, skipping -2025-04-15T19:39:42.528-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.528-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses" does not exist, skipping -2025-04-15T19:39:42.528-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.528-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "animal" does not exist, skipping -2025-04-15T19:39:42.528-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.528-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "consulta" does not exist, skipping -2025-04-15T19:39:42.529-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.529-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "consulta" does not exist, skipping -2025-04-15T19:39:42.529-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.529-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "consulta" does not exist, skipping -2025-04-15T19:39:42.529-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.529-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "consulta" does not exist, skipping -2025-04-15T19:39:42.530-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.530-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "exame_fisico" does not exist, skipping -2025-04-15T19:39:42.530-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.530-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "exame_fisico" does not exist, skipping -2025-04-15T19:39:42.530-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.530-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "vacina" does not exist, skipping -2025-04-15T19:39:42.530-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.531-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamnese-pergunta" does not exist, skipping -2025-04-15T19:39:42.531-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.531-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamnese_historico" does not exist, skipping -2025-04-15T19:39:42.531-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.531-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamneses" does not exist, skipping -2025-04-15T19:39:42.531-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.532-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "animal" does not exist, skipping -2025-04-15T19:39:42.532-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.532-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "consulta" does not exist, skipping -2025-04-15T19:39:42.532-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.532-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "contato" does not exist, skipping -2025-04-15T19:39:42.532-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.532-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "endereco" does not exist, skipping -2025-04-15T19:39:42.532-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.532-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "exame_fisico" does not exist, skipping -2025-04-15T19:39:42.533-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.533-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "perguntas" does not exist, skipping -2025-04-15T19:39:42.533-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.533-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "tutor" does not exist, skipping -2025-04-15T19:39:42.533-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.533-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "usuario" does not exist, skipping -2025-04-15T19:39:42.533-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.533-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "vacina" does not exist, skipping -2025-04-15T19:39:42.533-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.533-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses_anamnese_perguntas" does not exist, skipping -2025-04-15T19:39:42.534-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.534-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses_anamnese_perguntas" does not exist, skipping -2025-04-15T19:39:42.534-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.534-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses_historico_progresso_medico" does not exist, skipping -2025-04-15T19:39:42.534-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.534-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "anamneses_historico_progresso_medico" does not exist, skipping -2025-04-15T19:39:42.535-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.535-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "token" does not exist, skipping -2025-04-15T19:39:42.535-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.535-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "tutor_contato" does not exist, skipping -2025-04-15T19:39:42.535-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.535-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "tutor_contato" does not exist, skipping -2025-04-15T19:39:42.535-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.535-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "tutor_endereco" does not exist, skipping -2025-04-15T19:39:42.536-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.536-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "tutor_endereco" does not exist, skipping -2025-04-15T19:39:42.536-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.536-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "usuario_consultas" does not exist, skipping -2025-04-15T19:39:42.536-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.536-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : relation "usuario_consultas" does not exist, skipping -2025-04-15T19:39:42.536-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.536-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamneses_anamnese_perguntas" does not exist, skipping -2025-04-15T19:39:42.536-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.537-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "anamneses_historico_progresso_medico" does not exist, skipping -2025-04-15T19:39:42.537-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.537-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "token" does not exist, skipping -2025-04-15T19:39:42.537-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.537-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "tutor_contato" does not exist, skipping -2025-04-15T19:39:42.537-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.537-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "tutor_endereco" does not exist, skipping -2025-04-15T19:39:42.537-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.537-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : table "usuario_consultas" does not exist, skipping -2025-04-15T19:39:42.538-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:42.538-03:00 WARN 7427 --- [main] o.h.engine.jdbc.spi.SqlExceptionHelper : sequence "token_seq" does not exist, skipping -2025-04-15T19:39:42.659-03:00 INFO 7427 --- [main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' -2025-04-15T19:39:42.896-03:00 INFO 7427 --- [main] o.s.d.j.r.query.QueryEnhancerFactory : Hibernate is in classpath; If applicable, HQL parser will be used. -2025-04-15T19:39:43.545-03:00 WARN 7427 --- [main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning -2025-04-15T19:39:43.604-03:00 INFO 7427 --- [main] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@738b34af, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@67108db4, org.springframework.security.web.context.SecurityContextHolderFilter@4afd8f16, org.springframework.security.web.header.HeaderWriterFilter@1c09a369, org.springframework.security.web.authentication.logout.LogoutFilter@40a43556, com.orbitech.npvet.oauth.jwt.JwtAuthenticationFilter@38db8089, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@52971afb, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@637798b4, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@5eab3eac, org.springframework.security.web.access.ExceptionTranslationFilter@48405f04, org.springframework.security.web.access.intercept.AuthorizationFilter@7d4d3842] -2025-04-15T19:39:43.990-03:00 INFO 7427 --- [main] c.o.npvet.EntityTest.PerguntaTest : Started PerguntaTest in 3.236 seconds (process running for 3.873) -2025-04-15T19:39:44.232-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.ExameFisicoTest]: ExameFisicoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. -2025-04-15T19:39:44.233-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.ExameFisicoTest -2025-04-15T19:39:44.281-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.AnimalDTOTest]: AnimalDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. -2025-04-15T19:39:44.286-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.AnimalDTOTest -2025-04-15T19:39:44.300-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.VacinaDTOTest]: VacinaDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. -2025-04-15T19:39:44.301-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.VacinaDTOTest -2025-04-15T19:39:44.344-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.VacinaTest]: VacinaTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. -2025-04-15T19:39:44.345-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.VacinaTest -2025-04-15T19:39:44.359-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.AnamneseTest]: AnamneseTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. -2025-04-15T19:39:44.360-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.AnamneseTest -2025-04-15T19:39:44.371-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.UsuarioTest]: UsuarioTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. -2025-04-15T19:39:44.371-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.UsuarioTest -2025-04-15T19:39:44.379-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.NpvetApplicationTests]: NpvetApplicationTests does not declare any static, non-private, non-final, nested classes annotated with @Configuration. -2025-04-15T19:39:44.381-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.NpvetApplicationTests -2025-04-15T19:39:44.386-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.UsuarioDtoTest]: UsuarioDtoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. -2025-04-15T19:39:44.387-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.UsuarioDtoTest -2025-04-15T19:39:44.393-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.TutorTest]: TutorTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. -2025-04-15T19:39:44.394-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.TutorTest -2025-04-15T19:39:44.404-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.AnamneseHistoricoTest]: AnamneseHistoricoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. -2025-04-15T19:39:44.405-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.AnamneseHistoricoTest -2025-04-15T19:39:44.412-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.ExameFisicoDTOTest]: ExameFisicoDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. -2025-04-15T19:39:44.413-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.ExameFisicoDTOTest -2025-04-15T19:39:44.428-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.ContatoTest]: ContatoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. -2025-04-15T19:39:44.433-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.ContatoTest -2025-04-15T19:39:44.440-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.AnimalTest]: AnimalTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. -2025-04-15T19:39:44.441-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.AnimalTest -2025-04-15T19:39:44.455-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.ContatoDTOTest]: ContatoDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. -2025-04-15T19:39:44.457-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.ContatoDTOTest -2025-04-15T19:39:44.464-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.EntityTest.EnderecoTest]: EnderecoTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. -2025-04-15T19:39:44.466-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.EntityTest.EnderecoTest -2025-04-15T19:39:44.478-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.EnderecoDTOTest]: EnderecoDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. -2025-04-15T19:39:44.479-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.EnderecoDTOTest -2025-04-15T19:39:44.489-03:00 INFO 7427 --- [main] t.c.s.AnnotationConfigContextLoaderUtils : Could not detect default configuration classes for test class [com.orbitech.npvet.DTOTest.TutorDTOTest]: TutorDTOTest does not declare any static, non-private, non-final, nested classes annotated with @Configuration. -2025-04-15T19:39:44.489-03:00 INFO 7427 --- [main] .b.t.c.SpringBootTestContextBootstrapper : Found @SpringBootConfiguration com.orbitech.npvet.NpvetApplication for test class com.orbitech.npvet.DTOTest.TutorDTOTest -2025-04-15T19:39:44.502-03:00 INFO 7427 --- [SpringApplicationShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' -2025-04-15T19:39:44.517-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:44.517-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkryqhlmk35ogpp3jxx4rh68yk6 on table anamneses_anamnese_perguntas -2025-04-15T19:39:44.519-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:44.519-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkj180gtcsb792u2fk8bv1ritss on table anamneses_historico_progresso_medico -2025-04-15T19:39:44.521-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:44.522-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to 2 other objects -2025-04-15T19:39:44.525-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:44.525-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkooe7ghmjfibiiiaeumgu4lrr9 on table usuario_consultas -2025-04-15T19:39:44.526-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:44.526-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkp9adf0r99ppueo26leonkk3dj on table tutor_contato -2025-04-15T19:39:44.528-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:44.528-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to constraint fkntx5ttgu7xkuccjc0upkfxvbg on table tutor_endereco -2025-04-15T19:39:44.532-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:44.532-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to 2 other objects -2025-04-15T19:39:44.534-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:44.534-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : drop cascades to 2 other objects -2025-04-15T19:39:44.536-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:44.536-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkryqhlmk35ogpp3jxx4rh68yk6" of relation "anamneses_anamnese_perguntas" does not exist, skipping -2025-04-15T19:39:44.537-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:44.537-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkn181obfnf7s68nnoj6r159a67" of relation "anamneses_anamnese_perguntas" does not exist, skipping -2025-04-15T19:39:44.538-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:44.538-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkj180gtcsb792u2fk8bv1ritss" of relation "anamneses_historico_progresso_medico" does not exist, skipping -2025-04-15T19:39:44.539-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:44.539-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fk2wdtp4d1fp3plwa1irevgxxth" of relation "anamneses_historico_progresso_medico" does not exist, skipping -2025-04-15T19:39:44.540-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:44.540-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fk5kj7c5g7y3kfcrm7bx8e30qod" of relation "token" does not exist, skipping -2025-04-15T19:39:44.541-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:44.541-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkp9adf0r99ppueo26leonkk3dj" of relation "tutor_contato" does not exist, skipping -2025-04-15T19:39:44.541-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:44.541-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkpkk8cikgtskg8dasw3tshtg02" of relation "tutor_contato" does not exist, skipping -2025-04-15T19:39:44.542-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:44.542-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkntx5ttgu7xkuccjc0upkfxvbg" of relation "tutor_endereco" does not exist, skipping -2025-04-15T19:39:44.543-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:44.543-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkpuwl7gfirj9402n0g37q50v98" of relation "tutor_endereco" does not exist, skipping -2025-04-15T19:39:44.544-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:44.544-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkooe7ghmjfibiiiaeumgu4lrr9" of relation "usuario_consultas" does not exist, skipping -2025-04-15T19:39:44.545-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : SQL Warning Code: 0, SQLState: 00000 -2025-04-15T19:39:44.545-03:00 WARN 7427 --- [SpringApplicationShutdownHook] o.h.engine.jdbc.spi.SqlExceptionHelper : constraint "fkbfa7h15o0v6bdi8cfhediah0i" of relation "usuario_consultas" does not exist, skipping -2025-04-15T19:39:44.557-03:00 INFO 7427 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... -2025-04-15T19:39:44.558-03:00 INFO 7427 --- [SpringApplicationShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.