joelTo / JavaEE

0 stars 0 forks source link

Integration Spring avec XML #4

Open joelTo opened 7 years ago

joelTo commented 7 years ago

** Projet Pizzeria Console

Objectif:

04/01/17

Procédure :

04/01/17

[application-Configration.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" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.2.xsd">

<bean id="scanner" class="java.util.Scanner">
    <constructor-arg>
        <util:constant static-field="java.lang.System.in" />
    </constructor-arg>
</bean>

<bean id="ihmUtil" class="fr.ihm.IhmUtil">
    <constructor-arg ref="scanner" />
    <constructor-arg ref="pizzaDaoTableau" />
</bean>

[application-config.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.xsd">

changement {PizzeriaAdminConsoleApp}

--> $ javac ... --> $ java .... --> $ (affiche la liste du menu)