public class DAOManager {
@Autowired
private DataSource dataSource;
.....
When I go to run the above, dataSource remains as null.
How I've configured the bean in web-context.xml:
<!-- Datasource (database) bean -->
<bean id="dataSource"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="XXXXX" />
<property name="username" value="XXXX" />
<property name="password" value="XXXX" />
</bean>
I feel like there's something I need to be adding to my web-context.xml to add the DAOManager class into its jurisdiction.. am I right with this? Sorry, first time Spring MVC user.
Thank you for your time.