Skip to content
Advertisement

Tag: spring-boot

Heroku deployment error “required a bean of type ‘org.springframework.security.oauth2.jwt.JwtDecoder’ that could not be found.”

I am trying to deploy my springboot app to heroku but I am getting an error that it cannot find a JwtDecoder bean. I have tried googling it a bit but can’t find anything that helps. Everything works fine locally, just not when deployed to heroku. Here is my heroku log –tail: WebSecurityConfig: I’m not sure what else to include…

Spring boot dependency error for some of the dependencies in maven

Below is my pom.xml Error message i am getting is But in most of the cases what I observed most of them wont declare any version for spring-boot-starter-data-jpa and spring-boot-starter-web but i am getting these errors I am getting errors for all the dependencies where i had not declared version So i want to know how to resolve these errors

@AliasFor doesn’t work on attribute in custom annotation

I’m using SpringBoot 2.4.2. And I’m struggling with @AliasFor with custom annotation. I implemented below custom annotation. And using it like this. And this test code fails. with message I don’t know why, anyone know? Answer An annotation is static metadata for a class, field etc. so Spring cannot change anything about it. To make features as @AliasFor possible Spring

How to extract telemetry code from different methods? Decorator pattern? AOP?

We are using Application Insights to monitor different service calls in our applications. Data for Application Insights is provided by many different methods and classes but always in an identical way/by identical code fragments: How am I able to extract those wrapping try catch fragments to one point of responsibility? I took a look at the dacorator pattern but I

Mapstruct – no qualifying bean of type

I try to autowire my mapstruct mapper: This works: But WHY I can’t use: I get the following error: Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘pl.comp.window.application.mapper.WindowDtoMapper’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1717) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1273) Maybe I should stay with the first working solution? Is it bad solution or

Flyway did not create tables

I have been trying to create a web application using spring boot and flyway. The build tool is Gradle. However, when I try to run the program Flyway creates just one table named flyway_schema_hystory but doesn’t create a table from SQL script. Script V1__Create_all_tables.sql is on correct package src/main/resources/db/migration. Dependency in build.gradle was added, flyway properties were added in app.properties

Spring Boot Fails while maven test …jdk8 and aws-sdk-bom 1.11

This is my pom.xml 4.0.0 org.springframework.boot spring-boot-starter-parent 2.1.6.RELEASE com.dummy lattt 0.0.1-SNAPSHOT war lattt lattt I have 2 junit test and these are failing repeatedly 1.Installed and Using jdk 8 2.But aws-sdk-bom runs with 1.11.618 and downloads&executes test with 1.11.618 3.And throws the error Test file How to execute the mvn test with errors Authentication Provider ->Yes Answer “Could not find

Advertisement