Quantcast
Channel: BlogoSfera » autowire
Browsing latest articles
Browse All 11 View Live

Spring can’t autowire class

I have the following Spring @Configuration: @Bean @Qualifier("mongo") public MongoFacade mongo(Environment env){ final String host = env.getProperty("database.host"); final MongoClient mongoClient =...

View Article



Spring autowire interface

I have an Interface IMenuItem public interface IMenuItem { String getIconClass(); void setIconClass(String iconClass); String getLink(); void setLink(String link); String getText(); void setText(String...

View Article

How to autowire class in Maven multi module Spring web app?

I am working on application which contains Maven multi module projects. When I try to @Autowire a service class from another module I’m getting java.lang.NoClassDefFoundError: Parent Project Pom.xml...

View Article

autowire DataSource to a class which extends JdbcDaoSupport

I’m developing java,spring web application. I had some problems with adding DataSource to the DAO implement class which extends JdbcDaoSupport. I searched through the internet and found similar...

View Article

Unable to autowire bean in a class

Below is the Configuration Class where I am defining the bean. @Configuration @EnableWebMvc @ComponentScan(basePackages = { "com.abc.billing.web.controllers", "com.abc.billing.core.services" })...

View Article


how to autowire @bean classes

I have following @configuration class @Configurtion public class SomeClass { @Bean public BeanClass get() { return new BeanClass() } } Now I want to autowire BeanClass in some other class public class...

View Article

In spring MVC, is it a good practice to autowire multiple repositories in one...

I am writing a medium-big web application using Spring as my main framework, I was wondering if I should create a service layer for each repo or if it’s a good practice to have one service for multiple...

View Article

Spring 4 not automatically qualifying generic types on autowire

I am developing a desktop application currently using Spring (spring-context, 4.1.6.RELEASE) for IoC and dependency injection. I am using an annotation configuration, using @ComponentScan. The issue I...

View Article


why is autowire setter value not set?

I have a class like this public class ServiceImpl { private boolean required = false; public ServiceImpl (Log log) { this.db = Registry.getDatabase(this); this.log = log; rt = new Table(log, db); it =...

View Article


Unable to autowire custom UserDetails

A Spring Boot app has a custom UserDetails. Everything works properly when all the app does is authenticate existing users from a database with the User class. However, problems emerge when I try to...

View Article
Browsing latest articles
Browse All 11 View Live




Latest Images