diff --git a/.gitignore b/.gitignore
index 25c8fdbaba62c31aacfa2307975b06fbfd017485..772193c7cd48e63c93405a2c87d7d66a6a076eeb 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,2 @@
-node_modules
-package-lock.json
\ No newline at end of file
+tp1/node_modules
+tp1/package-lock.json
\ No newline at end of file
diff --git a/README.md b/tp1/README.md
similarity index 100%
rename from README.md
rename to tp1/README.md
diff --git a/config.json b/tp1/config.json
similarity index 100%
rename from config.json
rename to tp1/config.json
diff --git a/config.yml b/tp1/config.yml
similarity index 100%
rename from config.yml
rename to tp1/config.yml
diff --git a/package.json b/tp1/package.json
similarity index 100%
rename from package.json
rename to tp1/package.json
diff --git a/tp1.js b/tp1/tp1.js
similarity index 100%
rename from tp1.js
rename to tp1/tp1.js
diff --git a/tp2/.idea/compiler.xml b/tp2/.idea/compiler.xml
new file mode 100644
index 0000000000000000000000000000000000000000..606315f103cc1ee770377d98074d647624d6b6b2
--- /dev/null
+++ b/tp2/.idea/compiler.xml
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="CompilerConfiguration">
+ <annotationProcessing>
+ <profile name="Maven default annotation processors profile" enabled="true">
+ <sourceOutputDir name="target/generated-sources/annotations" />
+ <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
+ <outputRelativeToContentRoot value="true" />
+ <module name="spring" />
+ </profile>
+ </annotationProcessing>
+ <bytecodeTargetLevel>
+ <module name="spring" target="1.5" />
+ </bytecodeTargetLevel>
+ </component>
+</project>
\ No newline at end of file
diff --git a/tp2/.idea/encodings.xml b/tp2/.idea/encodings.xml
new file mode 100644
index 0000000000000000000000000000000000000000..aa00ffab7828f4818589659c804ec2cfd99baed3
--- /dev/null
+++ b/tp2/.idea/encodings.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="Encoding">
+ <file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
+ <file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
+ </component>
+</project>
\ No newline at end of file
diff --git a/tp2/.idea/jarRepositories.xml b/tp2/.idea/jarRepositories.xml
new file mode 100644
index 0000000000000000000000000000000000000000..712ab9d985c20018a0c97b93d2148ac1ffe588a5
--- /dev/null
+++ b/tp2/.idea/jarRepositories.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="RemoteRepositoriesConfiguration">
+ <remote-repository>
+ <option name="id" value="central" />
+ <option name="name" value="Central Repository" />
+ <option name="url" value="https://repo.maven.apache.org/maven2" />
+ </remote-repository>
+ <remote-repository>
+ <option name="id" value="central" />
+ <option name="name" value="Maven Central repository" />
+ <option name="url" value="https://repo1.maven.org/maven2" />
+ </remote-repository>
+ <remote-repository>
+ <option name="id" value="jboss.community" />
+ <option name="name" value="JBoss Community repository" />
+ <option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
+ </remote-repository>
+ </component>
+</project>
\ No newline at end of file
diff --git a/tp2/.idea/libraries/Maven__org_springframework_spring_aop_5_3_23.xml b/tp2/.idea/libraries/Maven__org_springframework_spring_aop_5_3_23.xml
new file mode 100644
index 0000000000000000000000000000000000000000..b07f8ff149c482a8bed2201a465257184bdd8e2c
--- /dev/null
+++ b/tp2/.idea/libraries/Maven__org_springframework_spring_aop_5_3_23.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Maven: org.springframework:spring-aop:5.3.23">
+ <CLASSES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-aop/5.3.23/spring-aop-5.3.23.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-aop/5.3.23/spring-aop-5.3.23-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-aop/5.3.23/spring-aop-5.3.23-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component>
\ No newline at end of file
diff --git a/tp2/.idea/libraries/Maven__org_springframework_spring_beans_5_3_23.xml b/tp2/.idea/libraries/Maven__org_springframework_spring_beans_5_3_23.xml
new file mode 100644
index 0000000000000000000000000000000000000000..739a62def499d771771705d24fd20e12446ff2e1
--- /dev/null
+++ b/tp2/.idea/libraries/Maven__org_springframework_spring_beans_5_3_23.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Maven: org.springframework:spring-beans:5.3.23">
+ <CLASSES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-beans/5.3.23/spring-beans-5.3.23.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-beans/5.3.23/spring-beans-5.3.23-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-beans/5.3.23/spring-beans-5.3.23-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component>
\ No newline at end of file
diff --git a/tp2/.idea/libraries/Maven__org_springframework_spring_context_5_3_23.xml b/tp2/.idea/libraries/Maven__org_springframework_spring_context_5_3_23.xml
new file mode 100644
index 0000000000000000000000000000000000000000..76d8eddcb1f27f9a7600602dadabb84953e1e066
--- /dev/null
+++ b/tp2/.idea/libraries/Maven__org_springframework_spring_context_5_3_23.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Maven: org.springframework:spring-context:5.3.23">
+ <CLASSES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-context/5.3.23/spring-context-5.3.23.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-context/5.3.23/spring-context-5.3.23-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-context/5.3.23/spring-context-5.3.23-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component>
\ No newline at end of file
diff --git a/tp2/.idea/libraries/Maven__org_springframework_spring_core_5_3_23.xml b/tp2/.idea/libraries/Maven__org_springframework_spring_core_5_3_23.xml
new file mode 100644
index 0000000000000000000000000000000000000000..2a2a6b5ea52c2a60829e3ed60746722901488481
--- /dev/null
+++ b/tp2/.idea/libraries/Maven__org_springframework_spring_core_5_3_23.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Maven: org.springframework:spring-core:5.3.23">
+ <CLASSES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-core/5.3.23/spring-core-5.3.23.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-core/5.3.23/spring-core-5.3.23-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-core/5.3.23/spring-core-5.3.23-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component>
\ No newline at end of file
diff --git a/tp2/.idea/libraries/Maven__org_springframework_spring_expression_5_3_23.xml b/tp2/.idea/libraries/Maven__org_springframework_spring_expression_5_3_23.xml
new file mode 100644
index 0000000000000000000000000000000000000000..b16b8d736d2346c09bf3d42343b47e9997a4c3d5
--- /dev/null
+++ b/tp2/.idea/libraries/Maven__org_springframework_spring_expression_5_3_23.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Maven: org.springframework:spring-expression:5.3.23">
+ <CLASSES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-expression/5.3.23/spring-expression-5.3.23.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-expression/5.3.23/spring-expression-5.3.23-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-expression/5.3.23/spring-expression-5.3.23-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component>
\ No newline at end of file
diff --git a/tp2/.idea/libraries/Maven__org_springframework_spring_jcl_5_3_23.xml b/tp2/.idea/libraries/Maven__org_springframework_spring_jcl_5_3_23.xml
new file mode 100644
index 0000000000000000000000000000000000000000..fb6dc3789f084d6312efe06f87eb7750e34e5de6
--- /dev/null
+++ b/tp2/.idea/libraries/Maven__org_springframework_spring_jcl_5_3_23.xml
@@ -0,0 +1,13 @@
+<component name="libraryTable">
+ <library name="Maven: org.springframework:spring-jcl:5.3.23">
+ <CLASSES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-jcl/5.3.23/spring-jcl-5.3.23.jar!/" />
+ </CLASSES>
+ <JAVADOC>
+ <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-jcl/5.3.23/spring-jcl-5.3.23-javadoc.jar!/" />
+ </JAVADOC>
+ <SOURCES>
+ <root url="jar://$MAVEN_REPOSITORY$/org/springframework/spring-jcl/5.3.23/spring-jcl-5.3.23-sources.jar!/" />
+ </SOURCES>
+ </library>
+</component>
\ No newline at end of file
diff --git a/tp2/.idea/misc.xml b/tp2/.idea/misc.xml
new file mode 100644
index 0000000000000000000000000000000000000000..25daa30c84345e5483c3a3fdc5423595e648d486
--- /dev/null
+++ b/tp2/.idea/misc.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="MavenProjectsManager">
+ <option name="originalFiles">
+ <list>
+ <option value="$PROJECT_DIR$/pom.xml" />
+ </list>
+ </option>
+ </component>
+ <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
+</project>
\ No newline at end of file
diff --git a/tp2/.idea/modules.xml b/tp2/.idea/modules.xml
new file mode 100644
index 0000000000000000000000000000000000000000..2fd6bd5173eb7b22fbc43c3b4edac247c9898197
--- /dev/null
+++ b/tp2/.idea/modules.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="ProjectModuleManager">
+ <modules>
+ <module fileurl="file://$PROJECT_DIR$/spring.iml" filepath="$PROJECT_DIR$/spring.iml" />
+ </modules>
+ </component>
+</project>
\ No newline at end of file
diff --git a/tp2/.idea/vcs.xml b/tp2/.idea/vcs.xml
new file mode 100644
index 0000000000000000000000000000000000000000..6c0b8635858dc7ad44b93df54b762707ce49eefc
--- /dev/null
+++ b/tp2/.idea/vcs.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="VcsDirectoryMappings">
+ <mapping directory="$PROJECT_DIR$/.." vcs="Git" />
+ </component>
+</project>
\ No newline at end of file
diff --git a/tp2/.idea/workspace.xml b/tp2/.idea/workspace.xml
new file mode 100644
index 0000000000000000000000000000000000000000..6c98a4cbd9981b1c07348d21a0c84cbfa7b261e1
--- /dev/null
+++ b/tp2/.idea/workspace.xml
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+ <component name="AutoImportSettings">
+ <option name="autoReloadType" value="SELECTIVE" />
+ </component>
+ <component name="ChangeListManager">
+ <list default="true" id="a9fae9bc-7815-4f18-8656-4f804166f685" name="Changes" comment="">
+ <change beforePath="$PROJECT_DIR$/../.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/../.gitignore" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/../README.md" beforeDir="false" />
+ <change beforePath="$PROJECT_DIR$/../config.json" beforeDir="false" />
+ <change beforePath="$PROJECT_DIR$/../config.yml" beforeDir="false" />
+ <change beforePath="$PROJECT_DIR$/../package.json" beforeDir="false" />
+ <change beforePath="$PROJECT_DIR$/../tp1.js" beforeDir="false" />
+ </list>
+ <option name="SHOW_DIALOG" value="false" />
+ <option name="HIGHLIGHT_CONFLICTS" value="true" />
+ <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
+ <option name="LAST_RESOLUTION" value="IGNORE" />
+ </component>
+ <component name="FileTemplateManagerImpl">
+ <option name="RECENT_TEMPLATES">
+ <list>
+ <option value="Class" />
+ </list>
+ </option>
+ </component>
+ <component name="Git.Settings">
+ <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
+ </component>
+ <component name="GitSEFilterConfiguration">
+ <file-type-list>
+ <filtered-out-file-type name="LOCAL_BRANCH" />
+ <filtered-out-file-type name="REMOTE_BRANCH" />
+ <filtered-out-file-type name="TAG" />
+ <filtered-out-file-type name="COMMIT_BY_MESSAGE" />
+ </file-type-list>
+ </component>
+ <component name="MarkdownSettingsMigration">
+ <option name="stateVersion" value="1" />
+ </component>
+ <component name="MavenImportPreferences">
+ <option name="generalSettings">
+ <MavenGeneralSettings>
+ <option name="useMavenConfig" value="true" />
+ </MavenGeneralSettings>
+ </option>
+ </component>
+ <component name="ProjectId" id="2FzPHtV3zAzGJxQLbgknPjMQxOm" />
+ <component name="ProjectLevelVcsManager" settingsEditedManually="true">
+ <ConfirmationsSetting value="1" id="Add" />
+ </component>
+ <component name="ProjectViewState">
+ <option name="hideEmptyMiddlePackages" value="true" />
+ <option name="showLibraryContents" value="true" />
+ </component>
+ <component name="PropertiesComponent">
+ <property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
+ <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
+ <property name="WebServerToolWindowFactoryState" value="false" />
+ <property name="dart.analysis.tool.window.visible" value="false" />
+ <property name="project.structure.last.edited" value="Project" />
+ <property name="project.structure.proportion" value="0.0" />
+ <property name="project.structure.side.proportion" value="0.0" />
+ <property name="settings.editor.selected.configurable" value="com.poratu.idea.plugins.tomcat.setting.TomcatServersConfigurable" />
+ <property name="show.migrate.to.gradle.popup" value="false" />
+ </component>
+ <component name="RecentsManager">
+ <key name="MoveFile.RECENT_KEYS">
+ <recent name="$PROJECT_DIR$/src/main/resources/helloworld/helloworld" />
+ </key>
+ </component>
+ <component name="RunManager">
+ <configuration name="App" type="Application" factoryName="Application" temporary="true" nameIsGenerated="true">
+ <option name="MAIN_CLASS_NAME" value="trois_tiers.App" />
+ <module name="spring" />
+ <extension name="coverage">
+ <pattern>
+ <option name="PATTERN" value="trois_tiers.*" />
+ <option name="ENABLED" value="true" />
+ </pattern>
+ </extension>
+ <method v="2">
+ <option name="Make" enabled="true" />
+ </method>
+ </configuration>
+ <recent_temporary>
+ <list>
+ <item itemvalue="Application.App" />
+ </list>
+ </recent_temporary>
+ </component>
+ <component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
+ <component name="TaskManager">
+ <task active="true" id="Default" summary="Default task">
+ <changelist id="a9fae9bc-7815-4f18-8656-4f804166f685" name="Changes" comment="" />
+ <created>1665491867827</created>
+ <option name="number" value="Default" />
+ <option name="presentableId" value="Default" />
+ <updated>1665491867827</updated>
+ <workItem from="1665491868898" duration="335000" />
+ <workItem from="1665492235386" duration="1843000" />
+ </task>
+ <servers />
+ </component>
+ <component name="TypeScriptGeneratedFilesManager">
+ <option name="version" value="3" />
+ </component>
+ <component name="Vcs.Log.Tabs.Properties">
+ <option name="TAB_STATES">
+ <map>
+ <entry key="MAIN">
+ <value>
+ <State />
+ </value>
+ </entry>
+ </map>
+ </option>
+ </component>
+</project>
\ No newline at end of file
diff --git a/tp2/Readme.md b/tp2/Readme.md
new file mode 100644
index 0000000000000000000000000000000000000000..17661daf5762582d33d2dc35621458261b906b91
--- /dev/null
+++ b/tp2/Readme.md
@@ -0,0 +1,5 @@
+# TP2 - CDL
+
+## Lancement
+
+Pour lancer ce tp, exécuter le fichier `run.sh`, la dernière commande lance la partie faite durant le tp et les deux premières commandes sont inchangées.
diff --git a/tp2/pom.xml b/tp2/pom.xml
new file mode 100644
index 0000000000000000000000000000000000000000..ff90f1e581f4c6bbc269c731f902c1f7ad80a056
--- /dev/null
+++ b/tp2/pom.xml
@@ -0,0 +1,36 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>cdl</groupId>
+ <artifactId>spring</artifactId>
+ <version>1.0.0</version>
+ <packaging>jar</packaging>
+
+ <name>Exemples Spring Framework</name>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <spring.version>5.3.23</spring.version>
+ </properties>
+
+ <dependencies>
+ <!-- Spring Dependencies -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ </dependencies>
+</project>
diff --git a/tp2/run.sh b/tp2/run.sh
new file mode 100755
index 0000000000000000000000000000000000000000..8bfe16dafdb475c15eecd50b21662752de664626
--- /dev/null
+++ b/tp2/run.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+execute()
+{
+ echo $*
+ $*
+}
+
+execute mvn clean compile
+
+execute mvn exec:java -Dexec.mainClass="trois_tiers.Main"
+
+execute mvn exec:java -Dexec.mainClass="helloworld.Main"
+
+execute mvn exec:java -Dexec.mainClass="trois_tiers.App"
diff --git a/tp2/spring.iml b/tp2/spring.iml
new file mode 100644
index 0000000000000000000000000000000000000000..e2204842b4139f220008d074192b1d989a7403ae
--- /dev/null
+++ b/tp2/spring.iml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
+ <component name="FacetManager">
+ <facet type="Spring" name="Spring">
+ <configuration />
+ </facet>
+ </component>
+ <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_5">
+ <output url="file://$MODULE_DIR$/target/classes" />
+ <output-test url="file://$MODULE_DIR$/target/test-classes" />
+ <content url="file://$MODULE_DIR$">
+ <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
+ <excludeFolder url="file://$MODULE_DIR$/target" />
+ </content>
+ <orderEntry type="inheritedJdk" />
+ <orderEntry type="sourceFolder" forTests="false" />
+ <orderEntry type="library" name="Maven: org.springframework:spring-core:5.3.23" level="project" />
+ <orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.3.23" level="project" />
+ <orderEntry type="library" name="Maven: org.springframework:spring-beans:5.3.23" level="project" />
+ <orderEntry type="library" name="Maven: org.springframework:spring-context:5.3.23" level="project" />
+ <orderEntry type="library" name="Maven: org.springframework:spring-aop:5.3.23" level="project" />
+ <orderEntry type="library" name="Maven: org.springframework:spring-expression:5.3.23" level="project" />
+ </component>
+</module>
\ No newline at end of file
diff --git a/tp2/src/main/.DS_Store b/tp2/src/main/.DS_Store
new file mode 100644
index 0000000000000000000000000000000000000000..fa811c3f1e2b33dd5d1208cb8a66d76fa101e51c
Binary files /dev/null and b/tp2/src/main/.DS_Store differ
diff --git a/tp2/src/main/java/helloworld/Fabrique.java b/tp2/src/main/java/helloworld/Fabrique.java
new file mode 100644
index 0000000000000000000000000000000000000000..98ec0a875bccb27c4dbca396167e0f9179831802
--- /dev/null
+++ b/tp2/src/main/java/helloworld/Fabrique.java
@@ -0,0 +1,9 @@
+package helloworld;
+public class Fabrique
+{
+ public HelloWorld creerInstance()
+ {
+ System.out.println("Appel de Fabrique.creerInstance()");
+ return new HelloWorld();
+ }
+}
diff --git a/tp2/src/main/java/helloworld/HelloWorld.java b/tp2/src/main/java/helloworld/HelloWorld.java
new file mode 100644
index 0000000000000000000000000000000000000000..294354acece124be5a2bcaa1d2ff2c16faea5823
--- /dev/null
+++ b/tp2/src/main/java/helloworld/HelloWorld.java
@@ -0,0 +1,43 @@
+package helloworld;
+public class HelloWorld
+{
+ private String message;
+
+ public HelloWorld()
+ {
+ System.out.println("Appel du constructeur HelloWorld()");
+ }
+
+ public static HelloWorld creerInstance()
+ {
+ System.out.println("Appel de HelloWorld.creerInstance()");
+ return new HelloWorld();
+ }
+
+ public HelloWorld(String message)
+ {
+ System.out.println("Appel du constructeur HelloWorld(message=" + message +")");
+ this.message = message;
+ }
+
+ public void setMessage(String message)
+ {
+ System.out.println("Appel de HelloWorld.setMessage(message=" + message +")");
+ this.message = message;
+ }
+
+ public String getMessage()
+ {
+ return this.message;
+ }
+
+ public void initialisation()
+ {
+ System.out.println("Appel de HelloWorld.initialisation()");
+ }
+
+ public void destruction()
+ {
+ System.out.println("Appel de HelloWorld.destruction()");
+ }
+}
diff --git a/tp2/src/main/java/helloworld/Main.java b/tp2/src/main/java/helloworld/Main.java
new file mode 100644
index 0000000000000000000000000000000000000000..334593479e99d00e3f43f5ee088cb215cb966081
--- /dev/null
+++ b/tp2/src/main/java/helloworld/Main.java
@@ -0,0 +1,19 @@
+package helloworld;
+
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+
+public class Main
+{
+ public static void main( String[] args ) throws Exception
+ {
+ for(int i=1; i<11; i++) {
+ System.out.println("------------------------------");
+ System.out.println("Charger configuration" + i + ".xml");
+ ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("helloworld/configuration" + i + ".xml");
+ System.out.println("Obtenir helloworld" + i);
+ HelloWorld helloworld = ctx.getBean("helloworld" + i, HelloWorld.class);
+ System.out.println("Fermer configuration" + i + ".xml");
+ ctx.close();
+ }
+ }
+}
diff --git a/tp2/src/main/java/trois_tiers/App.java b/tp2/src/main/java/trois_tiers/App.java
new file mode 100644
index 0000000000000000000000000000000000000000..b6d34f956564a03bcb9853c022ff381261bc4c5f
--- /dev/null
+++ b/tp2/src/main/java/trois_tiers/App.java
@@ -0,0 +1,41 @@
+package trois_tiers;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.ConfigurableApplicationContext;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
+import org.springframework.stereotype.Component;
+
+@Component
+public class App {
+
+ @Autowired
+ Presentation presentation;
+
+ @Autowired
+ Metier metier;
+
+ @Autowired
+ Stockage stockage;
+
+ public static void main(String[] args) {
+ ConfigurableApplicationContext appContext = getAppContext();
+ App app = appContext.getBean(App.class);
+ appContext.close();
+ }
+
+ public static ConfigurableApplicationContext getAppContext() {
+ return new ClassPathXmlApplicationContext("spring-config.xml");
+ }
+
+ public void setPresentation(Presentation presentation) {
+ this.presentation = presentation;
+ }
+
+ public void setMetier(Metier metier) {
+ this.metier = metier;
+ }
+
+ public void setStockage(Stockage stockage) {
+ this.stockage = stockage;
+ }
+}
diff --git a/tp2/src/main/java/trois_tiers/Main.java b/tp2/src/main/java/trois_tiers/Main.java
new file mode 100644
index 0000000000000000000000000000000000000000..5482fce4759e8ee38cd01abf905cf7608f179a3e
--- /dev/null
+++ b/tp2/src/main/java/trois_tiers/Main.java
@@ -0,0 +1,32 @@
+package trois_tiers;
+public class Main
+{
+ public static void main(String[] args) {
+ System.out.println("Configuration 1");
+ configuration1();
+ System.out.println("Configuration 2");
+ configuration2();
+ System.out.println("Configuration 3");
+ configuration3();
+ }
+
+ public static void configuration1() {
+ Object o = new Presentation("Philippe Merle", new Metier(new Stockage("fichier.txt")));
+ }
+
+ public static void configuration2() {
+ Stockage stockage = new Stockage("fichier.txt");
+ Metier metier = new Metier(stockage);
+ Presentation presentation = new Presentation("Philippe Merle", metier);
+ }
+
+ public static void configuration3() {
+ Stockage stockage = new Stockage();
+ stockage.setNomFichier("fichier.txt");
+ Metier metier = new Metier();
+ metier.setStockage(stockage);
+ Presentation presentation = new Presentation();
+ presentation.setUtilisateur("Philippe Merle");
+ presentation.setMetier(metier);
+ }
+}
diff --git a/tp2/src/main/java/trois_tiers/Metier.java b/tp2/src/main/java/trois_tiers/Metier.java
new file mode 100644
index 0000000000000000000000000000000000000000..daa2c0f5744b77a026decf9237866a854d595f06
--- /dev/null
+++ b/tp2/src/main/java/trois_tiers/Metier.java
@@ -0,0 +1,24 @@
+package trois_tiers;
+public class Metier
+{
+ private Stockage stockage;
+
+ public Metier() {
+ System.out.println("Appel du constructeur Metier()");
+ }
+
+ public void setStockage(Stockage stockage) {
+ System.out.println("Appel de Metier.setStockage(" + stockage + ")");
+ this.stockage = stockage;
+ }
+
+ public Metier(Stockage stockage) {
+ System.out.println("Appel du constructeur Metier(stockage=" + stockage + ")");
+ this.stockage = stockage;
+ }
+
+ public String toString() {
+ System.out.println("Appel de Metier.toString()");
+ return "Metier(stockage=" + this.stockage.toString() + ")";
+ }
+}
diff --git a/tp2/src/main/java/trois_tiers/Presentation.java b/tp2/src/main/java/trois_tiers/Presentation.java
new file mode 100644
index 0000000000000000000000000000000000000000..34c81da95675e72e0da0b292c3a83dbd6eea4840
--- /dev/null
+++ b/tp2/src/main/java/trois_tiers/Presentation.java
@@ -0,0 +1,32 @@
+package trois_tiers;
+public class Presentation
+{
+ private String utilisateur;
+
+ private Metier metier;
+
+ public Presentation() {
+ System.out.println("Appel du constructeur Presentation()");
+ }
+
+ public void setUtilisateur(String utilisateur) {
+ System.out.println("Appel de Presentation.setMessage(" + utilisateur + ")");
+ this.utilisateur = utilisateur;
+ }
+
+ public void setMetier(Metier metier) {
+ System.out.println("Appel de Presentation.setMetier(" + metier + ")");
+ this.metier = metier;
+ }
+
+ public Presentation(String utilisateur, Metier metier) {
+ System.out.println("Appel du constructeur Presentation(utilisateur=" + utilisateur + ", metier=" + metier + ")");
+ this.utilisateur = utilisateur;
+ this.metier = metier;
+ }
+
+ public String toString() {
+ System.out.println("Appel de Presentation.toString()");
+ return "Presentation(utilisateur=" + this.utilisateur + " metier=" + this.metier.toString() + ")";
+ }
+}
diff --git a/tp2/src/main/java/trois_tiers/Stockage.java b/tp2/src/main/java/trois_tiers/Stockage.java
new file mode 100644
index 0000000000000000000000000000000000000000..d81a7900d01c2d0b2c78913f65994074b63af28e
--- /dev/null
+++ b/tp2/src/main/java/trois_tiers/Stockage.java
@@ -0,0 +1,24 @@
+package trois_tiers;
+public class Stockage
+{
+ private String nomFichier;
+
+ public Stockage() {
+ System.out.println("Appel du constructeur Stockage()");
+ }
+
+ public void setNomFichier(String nomFichier) {
+ System.out.println("Appel de Stockage.setNomFichier(" + nomFichier + ")");
+ this.nomFichier = nomFichier;
+ }
+
+ public Stockage(String nomFichier) {
+ System.out.println("Appel du constructeur Stockage(nomFichier=" + nomFichier + ")");
+ this.nomFichier = nomFichier;
+ }
+
+ public String toString() {
+ System.out.println("Appel de Stockage.toString()");
+ return "Stockage(nomFichier=" + this.nomFichier + ")";
+ }
+}
diff --git a/tp2/src/main/resources/helloworld/configuration1.xml b/tp2/src/main/resources/helloworld/configuration1.xml
new file mode 100644
index 0000000000000000000000000000000000000000..2a546eff037e1549869db80cc35f7111e17116d0
--- /dev/null
+++ b/tp2/src/main/resources/helloworld/configuration1.xml
@@ -0,0 +1,10 @@
+<?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">
+
+ <!-- création via le constructeur par défaut -->
+ <bean id="helloworld1" class="helloworld.HelloWorld"/>
+
+</beans>
diff --git a/tp2/src/main/resources/helloworld/configuration10.properties b/tp2/src/main/resources/helloworld/configuration10.properties
new file mode 100644
index 0000000000000000000000000000000000000000..e0e5c980c9076416710b425edb58680782b512cc
--- /dev/null
+++ b/tp2/src/main/resources/helloworld/configuration10.properties
@@ -0,0 +1 @@
+helloworld.message=Bonjour le monde !
diff --git a/tp2/src/main/resources/helloworld/configuration10.xml b/tp2/src/main/resources/helloworld/configuration10.xml
new file mode 100644
index 0000000000000000000000000000000000000000..c334e93f48697225f016b368a9234387be28e259
--- /dev/null
+++ b/tp2/src/main/resources/helloworld/configuration10.xml
@@ -0,0 +1,16 @@
+<?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:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context.xsd">
+
+ <context:property-placeholder location="classpath:helloworld/configuration10.properties"/>
+
+ <bean id="helloworld10" class="helloworld.HelloWorld">
+ <property name="message" value="${helloworld.message}"/>
+ </bean>
+
+</beans>
diff --git a/tp2/src/main/resources/helloworld/configuration2.xml b/tp2/src/main/resources/helloworld/configuration2.xml
new file mode 100644
index 0000000000000000000000000000000000000000..ae9a5099ddd075d2eb8031d16291c5366de3f13d
--- /dev/null
+++ b/tp2/src/main/resources/helloworld/configuration2.xml
@@ -0,0 +1,10 @@
+<?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">
+
+ <!-- création via une méthode de fabrique -->
+ <bean id="helloworld2" class="helloworld.HelloWorld" factory-method="creerInstance"/>
+
+</beans>
diff --git a/tp2/src/main/resources/helloworld/configuration3.xml b/tp2/src/main/resources/helloworld/configuration3.xml
new file mode 100644
index 0000000000000000000000000000000000000000..2bb91c2ef0b84baa9c91907d3125fb483cefe870
--- /dev/null
+++ b/tp2/src/main/resources/helloworld/configuration3.xml
@@ -0,0 +1,12 @@
+<?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">
+
+ <!-- création via un constructeur -->
+ <bean id="helloworld3" class="helloworld.HelloWorld">
+ <constructor-arg value="Hello World!"/>
+ </bean>
+
+</beans>
diff --git a/tp2/src/main/resources/helloworld/configuration4.xml b/tp2/src/main/resources/helloworld/configuration4.xml
new file mode 100644
index 0000000000000000000000000000000000000000..9100d1cbac392342b0c0d9d8a92a9024c9c53a19
--- /dev/null
+++ b/tp2/src/main/resources/helloworld/configuration4.xml
@@ -0,0 +1,12 @@
+<?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">
+
+ <bean id="fabrique" class="helloworld.Fabrique"/>
+
+ <!-- création via un bean fabrique -->
+ <bean id="helloworld4" factory-bean="fabrique" factory-method="creerInstance"/>
+
+</beans>
diff --git a/tp2/src/main/resources/helloworld/configuration5.xml b/tp2/src/main/resources/helloworld/configuration5.xml
new file mode 100644
index 0000000000000000000000000000000000000000..886065e70fadd4cef7f90d28c9c92b9ef2ebdafe
--- /dev/null
+++ b/tp2/src/main/resources/helloworld/configuration5.xml
@@ -0,0 +1,12 @@
+<?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">
+
+ <bean id="helloworld5"
+ class="helloworld.HelloWorld"
+ scope="singleton"
+ />
+
+</beans>
diff --git a/tp2/src/main/resources/helloworld/configuration6.xml b/tp2/src/main/resources/helloworld/configuration6.xml
new file mode 100644
index 0000000000000000000000000000000000000000..12d444262ef29e9995489ddc2a747db6828c57bb
--- /dev/null
+++ b/tp2/src/main/resources/helloworld/configuration6.xml
@@ -0,0 +1,12 @@
+<?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">
+
+ <bean id="helloworld6"
+ class="helloworld.HelloWorld"
+ scope="prototype"
+ />
+
+</beans>
diff --git a/tp2/src/main/resources/helloworld/configuration7.xml b/tp2/src/main/resources/helloworld/configuration7.xml
new file mode 100644
index 0000000000000000000000000000000000000000..764664952003de399ab509d5669b4a9bd4db99f0
--- /dev/null
+++ b/tp2/src/main/resources/helloworld/configuration7.xml
@@ -0,0 +1,13 @@
+<?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">
+
+ <bean id="helloworld7"
+ class="helloworld.HelloWorld"
+ init-method="initialisation"
+ destroy-method="destruction"
+ />
+
+</beans>
diff --git a/tp2/src/main/resources/helloworld/configuration8.xml b/tp2/src/main/resources/helloworld/configuration8.xml
new file mode 100644
index 0000000000000000000000000000000000000000..c68fead120e5c6ec907a82a8048a2516bdbecec7
--- /dev/null
+++ b/tp2/src/main/resources/helloworld/configuration8.xml
@@ -0,0 +1,12 @@
+<?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">
+
+ <bean id="helloworld8"
+ class="helloworld.HelloWorld"
+ lazy-init="true"
+ />
+
+</beans>
diff --git a/tp2/src/main/resources/helloworld/configuration9.xml b/tp2/src/main/resources/helloworld/configuration9.xml
new file mode 100644
index 0000000000000000000000000000000000000000..3157bf82e43934754a2ebb0ea9fcb952a2f6c2bd
--- /dev/null
+++ b/tp2/src/main/resources/helloworld/configuration9.xml
@@ -0,0 +1,11 @@
+<?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">
+
+ <bean id="helloworld9" class="helloworld.HelloWorld">
+ <property name="message" value="Hello World!"/>
+ </bean>
+
+</beans>
diff --git a/tp2/src/main/resources/spring-config.xml b/tp2/src/main/resources/spring-config.xml
new file mode 100644
index 0000000000000000000000000000000000000000..91ac8ae6a2cdc170c822216e452711dad1aa653d
--- /dev/null
+++ b/tp2/src/main/resources/spring-config.xml
@@ -0,0 +1,27 @@
+<?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">
+
+ <bean id="presentation" class="trois_tiers.Presentation">
+ <property name="metier" ref="metier" />
+ <property name="utilisateur" value="myuser" />
+ </bean>
+
+ <bean id="metier" class="trois_tiers.Metier">
+ <property name="stockage" ref="stockage" />
+ </bean>
+
+ <bean id="stockage" class="trois_tiers.Stockage">
+ <property name="nomFichier" value="myfile" />
+ </bean>
+
+ <bean id="app" class="trois_tiers.App">
+ <property name="presentation" ref="presentation" />
+ <property name="metier" ref="metier" />
+ <property name="stockage" ref="stockage" />
+ </bean>
+
+</beans>
\ No newline at end of file
diff --git a/tp2/target/classes/helloworld/Fabrique.class b/tp2/target/classes/helloworld/Fabrique.class
new file mode 100644
index 0000000000000000000000000000000000000000..8dc6a523b1cc7cd74f6f48bb186c95b8d6e83cdf
Binary files /dev/null and b/tp2/target/classes/helloworld/Fabrique.class differ
diff --git a/tp2/target/classes/helloworld/HelloWorld.class b/tp2/target/classes/helloworld/HelloWorld.class
new file mode 100644
index 0000000000000000000000000000000000000000..ddf68ebaebcaf59d863e01522f362b35c0511c47
Binary files /dev/null and b/tp2/target/classes/helloworld/HelloWorld.class differ
diff --git a/tp2/target/classes/helloworld/Main.class b/tp2/target/classes/helloworld/Main.class
new file mode 100644
index 0000000000000000000000000000000000000000..703bc94e84ab5f2220f2cf16b5ff72ff22840ff3
Binary files /dev/null and b/tp2/target/classes/helloworld/Main.class differ
diff --git a/tp2/target/classes/helloworld/configuration1.xml b/tp2/target/classes/helloworld/configuration1.xml
new file mode 100644
index 0000000000000000000000000000000000000000..2a546eff037e1549869db80cc35f7111e17116d0
--- /dev/null
+++ b/tp2/target/classes/helloworld/configuration1.xml
@@ -0,0 +1,10 @@
+<?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">
+
+ <!-- création via le constructeur par défaut -->
+ <bean id="helloworld1" class="helloworld.HelloWorld"/>
+
+</beans>
diff --git a/tp2/target/classes/helloworld/configuration10.properties b/tp2/target/classes/helloworld/configuration10.properties
new file mode 100644
index 0000000000000000000000000000000000000000..e0e5c980c9076416710b425edb58680782b512cc
--- /dev/null
+++ b/tp2/target/classes/helloworld/configuration10.properties
@@ -0,0 +1 @@
+helloworld.message=Bonjour le monde !
diff --git a/tp2/target/classes/helloworld/configuration10.xml b/tp2/target/classes/helloworld/configuration10.xml
new file mode 100644
index 0000000000000000000000000000000000000000..c334e93f48697225f016b368a9234387be28e259
--- /dev/null
+++ b/tp2/target/classes/helloworld/configuration10.xml
@@ -0,0 +1,16 @@
+<?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:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context.xsd">
+
+ <context:property-placeholder location="classpath:helloworld/configuration10.properties"/>
+
+ <bean id="helloworld10" class="helloworld.HelloWorld">
+ <property name="message" value="${helloworld.message}"/>
+ </bean>
+
+</beans>
diff --git a/tp2/target/classes/helloworld/configuration2.xml b/tp2/target/classes/helloworld/configuration2.xml
new file mode 100644
index 0000000000000000000000000000000000000000..ae9a5099ddd075d2eb8031d16291c5366de3f13d
--- /dev/null
+++ b/tp2/target/classes/helloworld/configuration2.xml
@@ -0,0 +1,10 @@
+<?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">
+
+ <!-- création via une méthode de fabrique -->
+ <bean id="helloworld2" class="helloworld.HelloWorld" factory-method="creerInstance"/>
+
+</beans>
diff --git a/tp2/target/classes/helloworld/configuration3.xml b/tp2/target/classes/helloworld/configuration3.xml
new file mode 100644
index 0000000000000000000000000000000000000000..2bb91c2ef0b84baa9c91907d3125fb483cefe870
--- /dev/null
+++ b/tp2/target/classes/helloworld/configuration3.xml
@@ -0,0 +1,12 @@
+<?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">
+
+ <!-- création via un constructeur -->
+ <bean id="helloworld3" class="helloworld.HelloWorld">
+ <constructor-arg value="Hello World!"/>
+ </bean>
+
+</beans>
diff --git a/tp2/target/classes/helloworld/configuration4.xml b/tp2/target/classes/helloworld/configuration4.xml
new file mode 100644
index 0000000000000000000000000000000000000000..9100d1cbac392342b0c0d9d8a92a9024c9c53a19
--- /dev/null
+++ b/tp2/target/classes/helloworld/configuration4.xml
@@ -0,0 +1,12 @@
+<?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">
+
+ <bean id="fabrique" class="helloworld.Fabrique"/>
+
+ <!-- création via un bean fabrique -->
+ <bean id="helloworld4" factory-bean="fabrique" factory-method="creerInstance"/>
+
+</beans>
diff --git a/tp2/target/classes/helloworld/configuration5.xml b/tp2/target/classes/helloworld/configuration5.xml
new file mode 100644
index 0000000000000000000000000000000000000000..886065e70fadd4cef7f90d28c9c92b9ef2ebdafe
--- /dev/null
+++ b/tp2/target/classes/helloworld/configuration5.xml
@@ -0,0 +1,12 @@
+<?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">
+
+ <bean id="helloworld5"
+ class="helloworld.HelloWorld"
+ scope="singleton"
+ />
+
+</beans>
diff --git a/tp2/target/classes/helloworld/configuration6.xml b/tp2/target/classes/helloworld/configuration6.xml
new file mode 100644
index 0000000000000000000000000000000000000000..12d444262ef29e9995489ddc2a747db6828c57bb
--- /dev/null
+++ b/tp2/target/classes/helloworld/configuration6.xml
@@ -0,0 +1,12 @@
+<?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">
+
+ <bean id="helloworld6"
+ class="helloworld.HelloWorld"
+ scope="prototype"
+ />
+
+</beans>
diff --git a/tp2/target/classes/helloworld/configuration7.xml b/tp2/target/classes/helloworld/configuration7.xml
new file mode 100644
index 0000000000000000000000000000000000000000..764664952003de399ab509d5669b4a9bd4db99f0
--- /dev/null
+++ b/tp2/target/classes/helloworld/configuration7.xml
@@ -0,0 +1,13 @@
+<?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">
+
+ <bean id="helloworld7"
+ class="helloworld.HelloWorld"
+ init-method="initialisation"
+ destroy-method="destruction"
+ />
+
+</beans>
diff --git a/tp2/target/classes/helloworld/configuration8.xml b/tp2/target/classes/helloworld/configuration8.xml
new file mode 100644
index 0000000000000000000000000000000000000000..c68fead120e5c6ec907a82a8048a2516bdbecec7
--- /dev/null
+++ b/tp2/target/classes/helloworld/configuration8.xml
@@ -0,0 +1,12 @@
+<?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">
+
+ <bean id="helloworld8"
+ class="helloworld.HelloWorld"
+ lazy-init="true"
+ />
+
+</beans>
diff --git a/tp2/target/classes/helloworld/configuration9.xml b/tp2/target/classes/helloworld/configuration9.xml
new file mode 100644
index 0000000000000000000000000000000000000000..3157bf82e43934754a2ebb0ea9fcb952a2f6c2bd
--- /dev/null
+++ b/tp2/target/classes/helloworld/configuration9.xml
@@ -0,0 +1,11 @@
+<?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">
+
+ <bean id="helloworld9" class="helloworld.HelloWorld">
+ <property name="message" value="Hello World!"/>
+ </bean>
+
+</beans>
diff --git a/tp2/target/classes/spring-config.xml b/tp2/target/classes/spring-config.xml
new file mode 100644
index 0000000000000000000000000000000000000000..91ac8ae6a2cdc170c822216e452711dad1aa653d
--- /dev/null
+++ b/tp2/target/classes/spring-config.xml
@@ -0,0 +1,27 @@
+<?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">
+
+ <bean id="presentation" class="trois_tiers.Presentation">
+ <property name="metier" ref="metier" />
+ <property name="utilisateur" value="myuser" />
+ </bean>
+
+ <bean id="metier" class="trois_tiers.Metier">
+ <property name="stockage" ref="stockage" />
+ </bean>
+
+ <bean id="stockage" class="trois_tiers.Stockage">
+ <property name="nomFichier" value="myfile" />
+ </bean>
+
+ <bean id="app" class="trois_tiers.App">
+ <property name="presentation" ref="presentation" />
+ <property name="metier" ref="metier" />
+ <property name="stockage" ref="stockage" />
+ </bean>
+
+</beans>
\ No newline at end of file
diff --git a/tp2/target/classes/trois_tiers/App.class b/tp2/target/classes/trois_tiers/App.class
new file mode 100644
index 0000000000000000000000000000000000000000..4352b5a49f80902b7e5c0a183bc6c13fe6c01cf3
Binary files /dev/null and b/tp2/target/classes/trois_tiers/App.class differ
diff --git a/tp2/target/classes/trois_tiers/Main.class b/tp2/target/classes/trois_tiers/Main.class
new file mode 100644
index 0000000000000000000000000000000000000000..b0e58096bc4ab2e0712fa2eb7a278b36578629c2
Binary files /dev/null and b/tp2/target/classes/trois_tiers/Main.class differ
diff --git a/tp2/target/classes/trois_tiers/Metier.class b/tp2/target/classes/trois_tiers/Metier.class
new file mode 100644
index 0000000000000000000000000000000000000000..7da8812bb4be9b0d5d5f8394e8142b335a53e827
Binary files /dev/null and b/tp2/target/classes/trois_tiers/Metier.class differ
diff --git a/tp2/target/classes/trois_tiers/Presentation.class b/tp2/target/classes/trois_tiers/Presentation.class
new file mode 100644
index 0000000000000000000000000000000000000000..b6564377ea2496a1970a368c606ea90585c047f6
Binary files /dev/null and b/tp2/target/classes/trois_tiers/Presentation.class differ
diff --git a/tp2/target/classes/trois_tiers/Stockage.class b/tp2/target/classes/trois_tiers/Stockage.class
new file mode 100644
index 0000000000000000000000000000000000000000..5bfd626aec6d26bb37db5b4bf0df37f555c91fbf
Binary files /dev/null and b/tp2/target/classes/trois_tiers/Stockage.class differ
diff --git a/tp2/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/tp2/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
new file mode 100644
index 0000000000000000000000000000000000000000..75bbfba9bc3b55effc2ae505f77914a2df7f6a17
--- /dev/null
+++ b/tp2/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
@@ -0,0 +1,8 @@
+trois_tiers/Presentation.class
+trois_tiers/Main.class
+trois_tiers/Metier.class
+helloworld/Main.class
+trois_tiers/Stockage.class
+trois_tiers/App.class
+helloworld/Fabrique.class
+helloworld/HelloWorld.class
diff --git a/tp2/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/tp2/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
new file mode 100644
index 0000000000000000000000000000000000000000..978c261cbd9fe29339605e4776cc19752a1df439
--- /dev/null
+++ b/tp2/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
@@ -0,0 +1,8 @@
+/Users/julien/Developpement/2-master/cdl/CDL_michot/tp2/src/main/java/trois_tiers/Metier.java
+/Users/julien/Developpement/2-master/cdl/CDL_michot/tp2/src/main/java/trois_tiers/Stockage.java
+/Users/julien/Developpement/2-master/cdl/CDL_michot/tp2/src/main/java/helloworld/Main.java
+/Users/julien/Developpement/2-master/cdl/CDL_michot/tp2/src/main/java/trois_tiers/Main.java
+/Users/julien/Developpement/2-master/cdl/CDL_michot/tp2/src/main/java/trois_tiers/App.java
+/Users/julien/Developpement/2-master/cdl/CDL_michot/tp2/src/main/java/trois_tiers/Presentation.java
+/Users/julien/Developpement/2-master/cdl/CDL_michot/tp2/src/main/java/helloworld/Fabrique.java
+/Users/julien/Developpement/2-master/cdl/CDL_michot/tp2/src/main/java/helloworld/HelloWorld.java