Skip to content

Commit a1d04ee

Browse files
committed
more content
1 parent 340cce0 commit a1d04ee

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.asciidoc

+17
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,23 @@ for (Student s : result) {
177177
CDI
178178
---
179179

180+
* Generate an interface `Greeting`
181+
+
182+
[source,java]
183+
----
184+
public interface Greeting {
185+
public String sayHello();
186+
}
187+
----
188+
+
189+
* Create a new class `SimpleGreeting`, implement the interface
190+
* Inject the bean in Servlet as `@Inject Greeting greeting;`
191+
* Print the output as `response.getOutputStream().print(greeting.sayHello());`
192+
* Show ``New missing/unsatisfied dependencies'' error and explain default injection
193+
* Add `@Dependent` on bean
194+
* Create a new class `FancyGreeting`, implement the interface, add `@Dependent`
195+
* Create a new qualifier using the wizard
196+
180197
* Wizards:
181198
http://docs.jboss.org/tools/4.1.x.Final/en/cdi_tools_reference_guide/html/chap-CDI_Tools_Reference_Guide-Creating_a_CDI_Web_Project.html[New CDI Web Project Wizard],
182199
http://docs.jboss.org/tools/4.1.x.Final/en/cdi_tools_reference_guide/html/chap-CDI_Tools_Reference_Guide-Wizards_and_Dialogs.html#d0e555[CDI Wizards]

0 commit comments

Comments
 (0)