Skip to content
Advertisement

Tag: spring-boot

Spring boot maven plugin: mvn clean package does not layered jar file automatically

I got trouble with spring-boot-maven-plugin build process. I just want to build excutable “layered” jar file for optimizing docker image. As document said this build process will produce layered jar by default https://docs.spring.io/spring-boot/docs/current/maven-plugin/reference/htmlsingle/. Here is apart of my pom.xml file I used spring boot 2.5.5, maven 3.6.3 Some steps produce: mvn clean package jar -tf target/[excutableJarFile].jar This filesystem of excutableJarFile

How can i fetch property from application-test.properties file in Java class?

I have set the variable “spring.profiles.active” in my environment to “test” and I have below file in my src/main/resources. application-test.properties It has one property “machine” I want to access this property in one of my Java based class. PropertiesConfig class: But while running this as a Spring boot application in Eclipse. I am getting below error: What am I missing?

SpringBootTest for an arbitrary ApplicationConfiguration class to test the reading of the application.yml file

I would like to learn how to write a SpringBootTest for an existing ApplicationConfiguration class for the purpose of testing the functionality of reading the application.yml file. I would be happy with java or groovy. I am not able to share the existing ApplicationConfiguration class, so I would gladly accept any example offered that starts with an existing ApplicationConfiguration that

Spring with Jackson set JsonAutoDetect globally

In my spring boot web application, I want to serialize many different classes to JSON when I return them from the function of a request mapping. These classes only contain private fields without getters. In order for Jackson to serialize these private fields I can annotate all those classes with the following annotation, which works perfectly fine as expected. But

Java spring userRegister creates two database entries instead of one

As above this creates two database entries in user table. The process should be following: a new user enters their email and password -> saved in login table user confirm Email address -> entry in user table with username (email) and first&second name should be null at first. For second the code would be like that (working) is returning {“answer”:”done”,”username”:null}

Cannot resolve symbol, but the dependency is in local repo

I’ve been reading all similar problems with maven but I cannot seem to be able to fix it. The issue is the classic “Cannot resolve symbol ‘pippo'”, in which case pippo is part of import com.pippo.device.manager.data.model.Device; This class Device comes from this artifact that I have in my local repo Evidence that it is in the local repository and evidence

How can i solve [Received fatal alert: bad_certificate]?

I’ve created two servers locally, and I’m going to apply a mutual authentication to their communication. I just don’t know what the problem is. I lack understanding of this mechanism, but I also lack understanding of the server itself. Create each key store Export to X.509 to register certificate in Truststore. Register each other’s certificates in Truststore. server’s application.properties client’s

Advertisement