spring-boot

How to inject(custructor) a spring bean into abstract mapper of Mapstruct?

北慕城南 提交于 2021-02-10 18:37:57
问题 I am having below mapper class in which I want to use CounterService . I am trying constructor injection but that's not working and null is printing. @Mapper(componentModel = "spring", uses = CounterService.class, injectionStrategy = InjectionStrategy.CONSTRUCTOR) public abstract class CarMapper { private CounterService counterService; public CarMapper(CounterService counterService) { this.counterService = counterService; } public abstract Car dtoToEntity(CarDto carDto); public CarDto

Package not found when Spring Boot plugin applied

无人久伴 提交于 2021-02-10 18:30:42
问题 I have a multi-module project with the following build.gradel files core: repositories { mavenCentral() } dependencies { providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat' } test-module: dependencies { implementation project(":core") } app: repositories { mavenCentral() } dependencies { implementation project(":core") implementation project(":test") } springBoot{ mainClassName = "com.yenovi.dev.Main" } and then the root : buildscript { repositories { mavenCentral() } }

firebase push notification error spring boot server side

ぐ巨炮叔叔 提交于 2021-02-10 17:52:02
问题 iam trying to send a notification from spring boot server side to client side android .. the server is working great and all things is good 2020-09-01 08:13:07.691 INFO 18941 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable 2020-09-01 08:13:07.691 INFO 18941 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging

firebase push notification error spring boot server side

百般思念 提交于 2021-02-10 17:48:05
问题 iam trying to send a notification from spring boot server side to client side android .. the server is working great and all things is good 2020-09-01 08:13:07.691 INFO 18941 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable 2020-09-01 08:13:07.691 INFO 18941 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging

AWS Fargate cannot access dockerized spring boot application over Load balancer/ public IP

好久不见. 提交于 2021-02-10 17:35:36
问题 I have deployed the docker image of my spring boot application over aws ECR, following creation of AWS fargate cluster. PFA screenshots of the configurations stating task, security, service and cluster definition.I can ping my public ip successfully. But I can't access my application over neither load balancer nor public ip. The urls I tried to access application were public_ip:8081/my_rest_end_point and load_balancer_public_dns:8081/my_reset_end_point I have tested running my docker image on

Actuator Exposing Endpoints not working

牧云@^-^@ 提交于 2021-02-10 15:53:49
问题 I am using spring boot 2.0.4 and want to expose my actuator endpoints. When adding the following to application.yml only info, health are being exposed. management: endpoints: web: exposure: include: "*" When I run http://localhost:8080/actuator I get {"_links":{"self":{"href":"http://localhost:8080/actuator","templated":false},"health":{"href":"http://localhost:8080/actuator/health","templated":false},"info":{"href":"http://localhost:8080/actuator/info","templated":false}}} 回答1: Spring Boot

JHipster throws error from Hikari, liquibase, Springboot configuration

左心房为你撑大大i 提交于 2021-02-10 15:05:19
问题 after setting up Jhipster microservice with MySQL Database and run it for the first time in the Intellij terminal the: Hikari, liquibase, Springboot configuration, throws error with this log: ERROR 8353 --- [ restartedMain] com.zaxxer.hikari.pool.HikariPool : Hikari - Exception during pool initialization. ERROR 8353 --- [ restartedMain] i.g.j.c.liquibase.AsyncSpringLiquibase : Liquibase could not start correctly, your database is NOT read ERROR 8353 --- [ restartedMain] com.zaxxer.hikari.pool

XSD schemaLocation, targetNamespace, default XML namespace matching

梦想与她 提交于 2021-02-10 15:00:31
问题 I am getting this error when I am validating XML against my XSD. Both schema and instance are valid and I am able to validate them in XML parsers but I am getting this error in Java: cvc-elt.1: Cannot find the declaration of element 'fieldsMapper' Below is my schema: <?xml version="1.0" encoding="UTF-8"?> <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="https://www.company.com/mine" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name=

Spring Boot 404 when trying to load a HTML file using Thymeleaf

不羁岁月 提交于 2021-02-10 14:51:46
问题 Like the title says, I'm getting the Whitelabel 404 error page when trying to access localhost:8080. Main class : package com.michaelLong.studentaddressbook; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; @SpringBootApplication public class StudentAddressBookApplication extends SpringBootServletInitializer { public static void main(String[]

Forttify dynamic-code-evaluation-unsafe-deserialization on Spring Boot Actuator 2.1.6

心不动则不痛 提交于 2021-02-10 14:47:47
问题 I have the same problem as in the question, the only answer is to upgrade the spring-boot version to 2.0.6. However, I currently have version 2.1.6.RELEASE and I still have the same vulnerability in the report. 回答1: Your scan report should have an abstract, explanation, and recommendation for the issue. (Here are a few links to help you generate the report - Fortify file (.fpr file) to PDF convertion, How do I generate a report that has all the issues?) In short, this issue is because