I have a service that I am trying to autowire in my controller. Every time I build the application I get this error. I know I'm doing something wrong in my application context. Can anyone shed some light?
This is my project on git: https://github.com/zackh321/spring-swag
applicationContext.xml
<?xml version = "1.0" encoding = "UTF-8"?>
<beans xmlns = "http://www.springframework.org/schema/beans"
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation = "http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="triangleService" class="com.zmags.interview.service.triangle.TriangleService" abstract="true">
<property name="triangleController" ref="triangleController"></property>
</bean>
</beans>
Error:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'demoController' defined in file [/Users/zhyder/Desktop/springboot-swagger-test/spring-swag/target/classes/com/zmags/interview/controller/DemoController.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zmags.interview.controller.DemoController]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanIsAbstractException: Error creating bean with name 'triangleService': Bean definition is abstract
EDIT appContext
<?xml version = "1.0" encoding = "UTF-8"?>
<beans xmlns = "http://www.springframework.org/schema/beans"
xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation = "http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="demoController" class="com.zmags.interview.controller.DemoController">
<property name="triangleService" ref="triangleService"></property>
</bean>
</beans>