Category "spring"

MongoAutoConfiguration does not create MongoClient bean

I have just read Spring Boot configuration with Morphia? and I am trying to implement it like this. But I always get Field mongoClient in MorphiaAutoConfigurati

MongoAutoConfiguration does not create MongoClient bean

I have just read Spring Boot configuration with Morphia? and I am trying to implement it like this. But I always get Field mongoClient in MorphiaAutoConfigurati

Spring MVC with HATEOAS

I use Spring MVC (no Spring Boot) with HATEOAS in order to get HAL-FORMS with Affordance response like this: "_links": { "index": { "hre

How to mock bean with @PostConstruct method

I need to mock some class that contains @PostConstruct method, but I get NullPointerException inside @PostConstruct method. My code looks like the following: @S

Tomcat static content path security with Spring

I'm trying to setup static content serving on my Tomcat 9 server So I specified it inside server.xml <Host name="${serverhost}" appBase="webapps" unpackWARs=

Update indexes mongodb using Spring

Does someone know what Spring application properties need to be specified so that the index is overwritten (if already been created) with new parameters. For ex

Spring Boot Creating endpoint for download logs

I created an endpoint in spring boot to download logs of the application: @Service public class LogService { public byte[] obterLog() { try {

Cannot Autowiring Spring MQTT

Spring 2.5.3 and Java 1.8 I want to send a json data to a mqtt topic but i cannot autowiring my Interface and i'm getting null pointer exception when i try with

Spring Boot 2 preventing Tomcat 9 from shutting down

I am having an issue where a Tomcat server fails to shut down correctly when it has a Spring Boot web application. This causes issues with scheduled tasks and b

Use DBUnit in Spring without defined entities via "nativequery"

I am trying to use DBunit while testing a Spring controller. The tests fail to initialize because my dataset contains tables/columns which are not defined by an

UnmarshallerImpl finalize() method leads to memory leak

I'm using webServiceTemplate in my multithread Spring app. There are my jaxb dependencies: compile('javax.xml.bind:jaxb-api:2.3.0') compile('org.glassfish.jaxb:

Display value of selected element of p:selectOneMenu and edit it

i am trying to select an object from a select many menu, which displays the available objects just fine. Then, when i select the one i am interested in, i wish

Is there a way to return collection instead of entity in @Repository's @Query

I have a query: @Query( value = "select name, age, now() from received.scheme ;", nativeQuery = true ) public {???} selectData() I cannot create or r

file from one node to another node?

I would like to add a database to it so that the information is stored.

is there a way to create a java class lombok field with a period or other custom character?

How can I make a field name have a period in it? Why? Because this eventually gets translated into JSON that is passed to a service, and the field needs to have

Spring cloud config using ssh instead of https

I am banging my head around why spring cloud config is using ssh even when i try to provide https uri in the application.yaml. Here's my quick config file: spri

Distinct and List of other column in postgresql

I am using postgres DB and i have table with two column name and sal . name Sal Raunak 10000 Raunak 5000 Rahul 500 Raunak 300

Cassandra Spring No Converter Found Capable of Converting from Type Instant to type Long

Am getting a No converter found capable of converting from type Instant to type Long while using Spring and Cassandra. I have 2 Instant fields writtenDate (in t

Combine @Component and @ConditionalOnBean into one annotation

I want to combine two Spring annotations into a single one. More exactly I want to combine @Component and @ConditionalOnBean into one annotation named @SubCompo

Declarables and MultiRabbit

I'm using spring-multirabbit library : rabbitmq: host: localhost port: 5672 username: guest password: guest multirabbitmq: enabled: true