diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 67a3759..4369726 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,10 +4,10 @@
-
-
+
+
-
+
@@ -19,6 +19,7 @@
+
@@ -84,7 +85,7 @@
1669234080818
-
+
1669371969480
@@ -93,7 +94,14 @@
1669371969480
-
+
+ 1669373591401
+
+
+
+ 1669373591401
+
+
@@ -112,6 +120,7 @@
-
+
+
\ No newline at end of file
diff --git a/src/main/java/com/jorpelu/ServicioDeProductos/ISercicioProducto.java b/src/main/java/com/jorpelu/ServicioDeProductos/ISercicioProducto.java
new file mode 100644
index 0000000..7318f67
--- /dev/null
+++ b/src/main/java/com/jorpelu/ServicioDeProductos/ISercicioProducto.java
@@ -0,0 +1,5 @@
+package com.jorpelu.ServicioDeProductos;
+
+public interface ISercicioProducto {
+ public Producto getProducto();
+}
diff --git a/src/main/java/com/jorpelu/ServicioDeProductos/Main.java b/src/main/java/com/jorpelu/ServicioDeProductos/Main.java
index 4d6cdc3..1be0e01 100644
--- a/src/main/java/com/jorpelu/ServicioDeProductos/Main.java
+++ b/src/main/java/com/jorpelu/ServicioDeProductos/Main.java
@@ -6,12 +6,13 @@ import org.springframework.context.support.ClassPathXmlApplicationContext;
public class Main {
public static void main(String[] args) {
ApplicationContext appContext = new ClassPathXmlApplicationContext("beans.xml");
- ServicioProductos servicioProductos = (ServicioProductos) appContext.getBean("productosService", ServicioProductos.class);
- System.out.println("id: " + servicioProductos.getProductos().getId());
- System.out.println("nombre: " + servicioProductos.getProductos().getNombre());
- System.out.println("descripcion: : " + servicioProductos.getProductos().getDescripcion());
- System.out.println("cantidad: " + servicioProductos.getProductos().getCantidad());
- System.out.println("precio: " + servicioProductos.getProductos().getPrecio());
+// ServicioProductos servicioProductos = (ServicioProductos) appContext.getBean("productosService", ServicioProductos.class);
+ ISercicioProducto servicioProductos = appContext.getBean(ISercicioProducto.class);
+ System.out.println("id: " + servicioProductos.getProducto().getId());
+ System.out.println("nombre: " + servicioProductos.getProducto().getNombre());
+ System.out.println("descripcion: : " + servicioProductos.getProducto().getDescripcion());
+ System.out.println("cantidad: " + servicioProductos.getProducto().getCantidad());
+ System.out.println("precio: " + servicioProductos.getProducto().getPrecio());
((ClassPathXmlApplicationContext) appContext).close();
}
}
\ No newline at end of file