Category "spring"

IOException parsing XML document from class path resource

Ok I'm currently trying mavenise a project. However my project fails to find the xml file containing the some beans. combined2.xml I have it defined as: p

POST byte array in multipart using Spring RestTemplate

I'm trying to POST a multipart/form-data using Spring RestTemplate with a byte array as the file to upload and it keeps failing (Server rejects with different k

exception sending context initialized event to listener instance of class

I have this class: public class DatabaseHelper { @Autowired static UtilService utilService; public static void fillEmptyTables(){ if(!isSk

exception sending context initialized event to listener instance of class

I have this class: public class DatabaseHelper { @Autowired static UtilService utilService; public static void fillEmptyTables(){ if(!isSk

why I see this when compiling my project in bootstrap? "Found 0 JPA repository interfaces."

I have created a Bootstrap project in which I have 3 repositories. When I compile the project I do not receive any errors but unfortunately I can not see my con

Flyway Found more than one migration with version

I've two sql files , one for oracle and one for mySql database. Path is as follows db/migration/mysql/V1_1_migration.sql db/migration/oracle/V1_1_migration

Spring JUnit: How to Mock autowired component in autowired component

I've got a Spring component I'd like to test and this component has an autowired attribute which I need to change for the purpose of unit testing. The problem i

Spring Hibernate Jackson Hibernate5Module

I have set up spring 4.3.1 with Hibernate 5.1.0 and Jackson 2.7.5 I had some lazy init Exceptions because the Jackson ObjectMapper tries to convert my Objects

Map JSON default tag to java variable

I am consuming a rest service where the incoming JSon Response is something like this "thumbnailUrls": { "small": "skinresources/unpackaged/images/defau

Spring MongoDB query sorting

I'm fairly new on mongodb, and while I'm trying to make ordered mongodb query. But spring data mongodb's sort method is deprecated. So I used org.springframewor

Spring @Value annotation always evaluating as null?

So, I have a simple properties file with the following entries: my.value=123 another.value=hello world This properties file is being loaded using a PropertyP

AuthenticationSuccessEvent never fired

I writing app where user logs in using facebook. My security config/application class: @SpringBootApplication @EnableOAuth2Sso @ComponentScan(basePackages = {

How to run gradle based spring boot application in background using command line in ubuntu?

I am trying to run gradle based hibernate spring boot application in background thread.

Spel not supported on spring annotation @Scheduled.fixedDelayString

I want to configure the fixedDelay in seconds in my properties file, then I want to convert it to millis in @Scheduled annotation. I expected this to work: @Sch

Error creating bean with name 'entityManagerFactory'

I have a web application that uses spring, hibernate and JPA. When I want to run my DAO unit tests, I get the following error: Caused by: org.springframewo

How do I produce just one message using Spring Cloud Stream w/o deprecated @Output, or turn off polling?

I am trying to publish just one message to Kafka, using Spring Cloud without any deprecated classes/methods or annotations. I would also like to be able to easi

SonnarQube's issue: change code to not construct the URL from user-controlled data

I facing a SonarQube bug and am not able to figure out whats the issue. SonnarQube's issue is, change this code to not construct the URL from user-controlled da

How to configure log4j in a Spring Mvc application configured with Java Annotations and using a log4j.properties file

I'm working on a Maven Web application using Spring MVC 4.2.5.RELEASE, I'm using Netbeans IDE with GlassFishSErver 4.1, I want to use log4j 1.2.17 so I created

Apache Camel: Set body from resource

Basically, I'm trying to do this (incorrect code!): <camel:setBody> <camel:simple>resource:classpath:/myfiles/file.xml</camel:simple>

Upload data file as byte array with Feign

How can I send file in Feign as byte array? @RequestLine("POST /api/files/{num}/push") @Headers({"Content-Type: application/zip"}) void pushFile(@Param