Questions tagged [spring-4]

Version 4.x of the Spring Framework

Use for general Spring related questions. This tag is for questions that are specific to versions 4.x only.

618 questions
0
votes
2 answers

SpringMVC and @Configuration: register ConversionService and HttpMessageConverter

I really like spring and the @Configuration style to get rid of xml based configuration. I successfully use it for the service and repository layer. What I also love is the dependency injection feature and the JDO/JPA/Jdbc utilities! What I don't…
Jan
  • 2,803
  • 6
  • 36
  • 57
0
votes
3 answers

Add slf4j dependency with Ant to Spring 4.0 application

I'm using spring 4.0 and I've started with the hello world example. When I ran the examples, I just got this exception, Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at…
vvekselva
  • 803
  • 3
  • 17
  • 34
0
votes
2 answers

Adding Spring 4 websockets to an existing spring project

My intent is to plug in the spring 4 websocket classes for my existing project. Here is the spring websocket project link: https://github.com/rstoyanchev/spring-websocket-test problem is my project is using xml configuration files while the…
Urbanleg
  • 6,252
  • 16
  • 76
  • 139
-1
votes
1 answer

Spring Security 4.X invalid usename

I'm trying to perform database authentication using Annotations in Spring Security. When i try to login it keeps showing invalid username and password and i'm pretty sure that i'm submitting the correct username and password from database…
-1
votes
1 answer

Unable to logout using spring 4 MVC

I have used spring 4 MVC in my project which is annotation based. I am able to login successfully but I am not able to logout. I have posted the configuration,initializer and controller classes below along with the login page and welcome…
nats
  • 1
  • 3
-1
votes
1 answer

Programmatic integration of Spring 4 and jersey

How do I autowire my spring beans in a jersey resource? I'm trying to cobble together a jersey app which uses spring to initialise the fields in the jax-rs resources. From googling, it seems possible but they are always null. My beans get created…
TedTrippin
  • 3,525
  • 5
  • 28
  • 46
-1
votes
1 answer

Why I am getting NoSuchBeanDefinitionException when I deploy my Spring application in Tomcat?

I am working with Spring and Spring Data JPA. When deploying my application in Tomcat I'm getting the following exception: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myController': Injection of autowired…
Gnik
  • 7,120
  • 20
  • 79
  • 129
-1
votes
3 answers

Spring MVC: cannot find other html files

Why the link http://localhost:8080/demo00/user/ didn't work, saying 404, how to fix it? My website project structure: website structure pom.xml:
J.W
  • 671
  • 7
  • 23
-1
votes
1 answer

Value annotation can't find a value if it's a number

Application.yaml: request.delay.ms: 200 A spring component: @Value("${request.delay.ms}") private long requestDelay; Now, as strange as it sounds, it looks like spring can successfully resolve the property if it's value is a string, i.e. if I…
Leo
  • 1,016
  • 1
  • 13
  • 32
-1
votes
1 answer

Spring 4 Feature : Autowired by generics is a little lie

Autowired by generics works perfectly fine with static type.But when i write @Autowired private GenericDAO dao; with dynamic type at runtime getting error at deploy time:"multiple bean definition found." Does Autowired by type in Spring 4 not…
js-hint
  • 66
  • 1
  • 10
-1
votes
2 answers

java spring framework 4 for building social networking web application

I am new to Java Spring 4. I have to develop a social networking web application in java Spring 4. Is there any sample application (Like NopCommerce in Asp.Net) covering all the advanced web development features like MVVM Model, Authentication,…
-1
votes
1 answer

hibernate rollback not working in service layer

i have issue in rollback insert/update data in postgresql database, in service layer, where as in DAO layer it is working fine. My DAO junit test…
pappu_kutty
  • 2,378
  • 8
  • 49
  • 93
-1
votes
1 answer

Spring 4 Create Bean Programmatically

I've been looking for a way to add datasources at runtime. I want to move away from defining the datasources in @Configuration class and instead when the app loads i want to dynamically create the datasource beans and inject them into the Spring…
Hatem Jaber
  • 2,341
  • 2
  • 22
  • 38
-1
votes
1 answer

Spring boot data hibernate different datasources

I am playing with spring-boot and spring-boot-data-jpa. I need that @Entity class A {...} uses hsqlDatasource and @Entity class B {...} use mssqlDatasource. How can I achieve that? I would like to do something like…
svobol13
  • 1,842
  • 3
  • 25
  • 40
-2
votes
1 answer

NullPointerException while running JUnit

Getting NullPointerException while running a JUnit test. I have already mocked the ClientHttpResponse class. Not sure what else I am missing. Error: java.lang.NullPointerException at…
Nital
  • 5,784
  • 26
  • 103
  • 195
1 2 3
41
42