Browse all latest questions tagged Spring
I am using: Hibernate 4.3.5 Spring JPA 1.6.0 Javax Persistence API 2.1 The "refcodemailing" column is defined as an array of int: int[] My entity object: @Entity @Table public class CalendarEven...
I am upgrading to Log4j to Log4j2 in my project. I have put log4j2.properties in the classpath, and its loading. Despite that logs are not coming according to properties defined in log4j2.properties....
I'm fairly new to Spring, and I've looked at many posts about similar scenarios, but I have yet to figure this out. I'm trying to alter an existing (working) endpoint in my project to pass an array...
I'm looking for the simplest, cleanest way of connecting to Heroku Postgres in a Spring Boot app using JPA/Hibernate. I don't see a good, complete example for this combo in either Heroku or Spring Bo...
I want to create JUnit5 tests for Rest API. @Test public void resetRequest_NAME_AND_EMAIL_MISMATCH() throws Exception { when(userRestService.resetRequest(anyString(), anyString())).thenReturn(Boo...
I wanna store an entity(a String + an image) in PostgresQL using Spring MVC and Hibernate Here is my table. The image is supposed to be the type of oid. CREATE TABLE document ( name character varyi...
When I hit the database with PagingAndSortingRepository.findAll(Pageable) I get Page<ObjectEntity>. However, I want to expose DTO's to the client and not entities. I can create DTO just by injec...
I have a Spring Boot API that runs locally, with a self-signed certificate, using the HTTPS protocol. Obviously, when I send GET Requests from the browser, I receive the io.netty.handler.codec.Decode...
I did a simple web socket communication with spring 4,STOMP and sock.js, following this https://github.com/rstoyanchev/spring-websocket-portfolio and this http://assets.spring.io/wp/WebSocketBlogPost....
Here is my controller: import javax.validation.constraints.NotEmpty; import javax.validation.constraints.NotNull; @Slf4j @RestController @RequestMapping("/auth-api") public class AuthController {...
I am using SpringBatch to read from Oracle and write into ElasticSearch. My code works fine for static queries. Example: select emp_id, emp_name from employee_table I have a RowMapper class that maps...
I have a controller's method with a PUT method, which receives multipart/form-data: @RequestMapping(value = "/putIn", method = RequestMethod.PUT) public Foo updateFoo(HttpServletRequest request...
I'm newbie in Spring Data. I keep getting the error: org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'text/plain;charset=UTF-8' not supported I've tried to change consumes ins...
I am trying to get used to python+java interaction and so I wrote a little python-script that I wanted to execute that script from my Spring Boot Application. That script is located in the (relative f...
Spring version 4.2.0, Hibernate 4.1.4 Here is my Controller function: @RequestMapping(value = "/mobile/getcomp", method = RequestMethod.GET) @ResponseBody public List<Company> listforCompanies...