@Autowired not working in my code - Objects values are null

15 Views Asked by At

I have created datasource bean in xml file and used @Autowired to datasource. But getting datasource object value 'null'. Because of @Autowired is not woking in whole code,all objects created in code are null which throws nullPointerException. Here in java code passing dataSource to create object of SimpleJdbcCall to connect db but datasource value is null.so getting error java.lang.IllegalArgumentException: Property 'dataSource' is required.Annoted java class with @Component.

0

There are 0 best solutions below