1111< title > jooby: avaje inject module</ title >
1212< link rel ="stylesheet " href ="../../js/styles/theme.css ">
1313< link rel ="stylesheet " href ="../../js/styles/atom-one-dark.min.css ">
14+ < meta name ="algolia-site-verification " content ="B92EF92B303805F4 ">
1415< link rel ="preconnect " href ="https://fonts.googleapis.com ">
1516< link rel ="preconnect " href ="https://fonts.gstatic.com " crossorigin >
17+ < link rel ="stylesheet " href ="https://cdn.jsdelivr.net/npm/@docsearch/css@3 ">
1618< link href ="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600&display=swap " rel ="stylesheet ">
1719< script >
1820 // This MUST be in the <head>. It runs before the body is rendered, preventing the white flash.
@@ -54,13 +56,13 @@ <h4 id="avaje-inject"><a class="anchor" href="#avaje-inject"></a><a class="link"
5456
5557
5658< div class ="switch "> < div class ="switch--item option-1 selected "> Maven</ div > < div class ="switch--item option-2 "> Gradle</ div > </ div > < div class ="content option-1 ">
57- < pre class ="highlightjs highlight "> < code class ="language-xml hljs " data-lang ="xml " id ="xdf871097aa634a25 "> <dependency>
59+ < pre class ="highlightjs highlight "> < code class ="language-xml hljs " data-lang ="xml " id ="x303e6936d4714fc6 "> <dependency>
5860 <groupId>io.jooby</groupId>
5961 <artifactId>jooby-avaje-inject</artifactId>
6062 <version>4.0.16</version>
61- </dependency></ code > < button class ="clipboard " data-clipboard-target ="#xdf871097aa634a25 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
63+ </dependency></ code > < button class ="clipboard " data-clipboard-target ="#x303e6936d4714fc6 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
6264</ div > < div class ="content hidden option-2 ">
63- < pre class ="highlightjs highlight "> < code class ="language-gradle hljs " data-lang ="gradle " id ="xf7468e0887e043d2 "> implementation 'io.jooby:jooby-avaje-inject:4.0.16'</ code > < button class ="clipboard " data-clipboard-target ="#xf7468e0887e043d2 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
65+ < pre class ="highlightjs highlight "> < code class ="language-gradle hljs " data-lang ="gradle " id ="xe97a8d0cc11e4a9a "> implementation 'io.jooby:jooby-avaje-inject:4.0.16'</ code > < button class ="clipboard " data-clipboard-target ="#xe97a8d0cc11e4a9a "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
6466</ div > </ div >
6567
6668< div class ="paragraph ">
@@ -70,7 +72,7 @@ <h4 id="avaje-inject"><a class="anchor" href="#avaje-inject"></a><a class="link"
7072
7173
7274< div class ="switch "> < div class ="switch--item option-1 selected "> Maven</ div > < div class ="switch--item option-2 "> Gradle</ div > </ div > < div class ="content option-1 ">
73- < pre class ="highlightjs highlight "> < code class ="language-xml hljs " data-lang ="xml " id ="x2a5fdf36b1ab456c "> <build>
75+ < pre class ="highlightjs highlight "> < code class ="language-xml hljs " data-lang ="xml " id ="x87f3b89d9b7544af "> <build>
7476 <plugins>
7577 <plugin>
7678 <groupId>org.apache.maven.plugins</groupId>
@@ -89,15 +91,15 @@ <h4 id="avaje-inject"><a class="anchor" href="#avaje-inject"></a><a class="link"
8991 </configuration>
9092 </plugin>
9193 </plugins>
92- </build></ code > < button class ="clipboard " data-clipboard-target ="#x2a5fdf36b1ab456c "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
94+ </build></ code > < button class ="clipboard " data-clipboard-target ="#x87f3b89d9b7544af "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
9395</ div > < div class ="content hidden option-2 ">
94- < pre class ="highlightjs highlight "> < code class ="language-kotlin hljs " data-lang ="kotlin " id ="x8a45f379b2944f5d "> plugins {
96+ < pre class ="highlightjs highlight "> < code class ="language-kotlin hljs " data-lang ="kotlin " id ="xd409422614774dbf "> plugins {
9597 id "org.jetbrains.kotlin.kapt" version "1.9.10"
9698}
9799
98100dependencies {
99101 kapt 'io.avaje:avaje-inject-generator:{avaje.inject.version}'
100- }</ code > < button class ="clipboard " data-clipboard-target ="#x8a45f379b2944f5d "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
102+ }</ code > < button class ="clipboard " data-clipboard-target ="#xd409422614774dbf "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
101103</ div > </ div >
102104
103105< div class ="admonitionblock note ">
@@ -121,7 +123,7 @@ <h4 id="avaje-inject"><a class="anchor" href="#avaje-inject"></a><a class="link"
121123< div class ="title "> Installing Avaje Inject</ div >
122124
123125< div class ="switch "> < div class ="switch--item option-1 selected "> Java</ div > < div class ="switch--item option-2 "> Kotlin</ div > </ div > < div class ="content option-1 ">
124- < pre class ="highlightjs highlight "> < code class ="language-java hljs " data-lang ="java " id ="x1abb5bbcd12f473b "> public class App extends Jooby {
126+ < pre class ="highlightjs highlight "> < code class ="language-java hljs " data-lang ="java " id ="xaef809d6bc3f4e8d "> public class App extends Jooby {
125127
126128 {
127129 install(AvajeInjectModule.of()); < b class ="conum "> (1)</ b >
@@ -135,9 +137,9 @@ <h4 id="avaje-inject"><a class="anchor" href="#avaje-inject"></a><a class="link"
135137 public static void main(String[] args) {
136138 runApp(args, App::new);
137139 }
138- }</ code > < button class ="clipboard " data-clipboard-target ="#x1abb5bbcd12f473b "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
140+ }</ code > < button class ="clipboard " data-clipboard-target ="#xaef809d6bc3f4e8d "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
139141</ div > < div class ="content hidden option-2 ">
140- < pre class ="highlightjs highlight "> < code class ="language-kotlin hljs " data-lang ="kotlin " id ="x1b1baaa46e9b4566 "> fun main(args: Array<String>) {
142+ < pre class ="highlightjs highlight "> < code class ="language-kotlin hljs " data-lang ="kotlin " id ="x62893a3fd4744e87 "> fun main(args: Array<String>) {
141143 runApp(args) {
142144 install(AvajeInjectModule.of()) < b class ="conum "> (1)</ b >
143145
@@ -146,7 +148,7 @@ <h4 id="avaje-inject"><a class="anchor" href="#avaje-inject"></a><a class="link"
146148 service.doSomething()
147149 }
148150 }
149- }</ code > < button class ="clipboard " data-clipboard-target ="#x1b1baaa46e9b4566 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
151+ }</ code > < button class ="clipboard " data-clipboard-target ="#x62893a3fd4744e87 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
150152</ div > </ div >
151153
152154< div class ="colist arabic ">
@@ -167,27 +169,27 @@ <h5 id="avaje-inject-property-injection"><a class="anchor" href="#avaje-inject-p
167169< div class ="listingblock ">
168170< div class ="title "> application.conf</ div >
169171< div class ="content ">
170- < pre class ="highlightjs highlight "> < code class ="language-bash hljs " data-lang ="bash " id ="xca67b2259de14923 "> currency = USD</ code > < button class ="clipboard " data-clipboard-target ="#xca67b2259de14923 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
172+ < pre class ="highlightjs highlight "> < code class ="language-bash hljs " data-lang ="bash " id ="xdd7c235477e5489a "> currency = USD</ code > < button class ="clipboard " data-clipboard-target ="#xdd7c235477e5489a "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
171173</ div >
172174</ div >
173175< div class ="listingblock primary ">
174176
175177
176178< div class ="switch "> < div class ="switch--item option-1 selected "> Java</ div > < div class ="switch--item option-2 "> Kotlin</ div > </ div > < div class ="content option-1 ">
177- < pre class ="highlightjs highlight "> < code class ="language-java hljs " data-lang ="java " id ="x334847f6e7c14424 "> @Singleton
179+ < pre class ="highlightjs highlight "> < code class ="language-java hljs " data-lang ="java " id ="x14660b0297b24c91 "> @Singleton
178180public class BillingService {
179181
180182 @Inject
181183 public BillingService(@External @Named("currency") String currency) {
182184 ...
183185 }
184186
185- }</ code > < button class ="clipboard " data-clipboard-target ="#x334847f6e7c14424 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
187+ }</ code > < button class ="clipboard " data-clipboard-target ="#x14660b0297b24c91 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
186188</ div > < div class ="content hidden option-2 ">
187- < pre class ="highlightjs highlight "> < code class ="language-kotlin hljs " data-lang ="kotlin " id ="x9f7349c9afb41ef "> @Singleton
189+ < pre class ="highlightjs highlight "> < code class ="language-kotlin hljs " data-lang ="kotlin " id ="x465572b613164def "> @Singleton
188190class BillingService @Inject constructor(@External @Named("currency") currency: String) {
189191 ...
190- }</ code > < button class ="clipboard " data-clipboard-target ="#x9f7349c9afb41ef "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
192+ }</ code > < button class ="clipboard " data-clipboard-target ="#x465572b613164def "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
191193</ div > </ div >
192194
193195</ div >
@@ -200,7 +202,7 @@ <h5 id="avaje-inject-mvc-routes"><a class="anchor" href="#avaje-inject-mvc-route
200202< div class ="title "> MVC and Avaje Inject</ div >
201203
202204< div class ="switch "> < div class ="switch--item option-1 selected "> Java</ div > < div class ="switch--item option-2 "> Kotlin</ div > </ div > < div class ="content option-1 ">
203- < pre class ="highlightjs highlight "> < code class ="language-java hljs " data-lang ="java " id ="xf50ef69dbdc142ee "> public class App extends Jooby {
205+ < pre class ="highlightjs highlight "> < code class ="language-java hljs " data-lang ="java " id ="xb10016eb39464580 "> public class App extends Jooby {
204206
205207 {
206208 install(AvajeInjectModule.of()); < b class ="conum "> (1)</ b >
@@ -211,15 +213,15 @@ <h5 id="avaje-inject-mvc-routes"><a class="anchor" href="#avaje-inject-mvc-route
211213 public static void main(String[] args) {
212214 runApp(args, App::new);
213215 }
214- }</ code > < button class ="clipboard " data-clipboard-target ="#xf50ef69dbdc142ee "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
216+ }</ code > < button class ="clipboard " data-clipboard-target ="#xb10016eb39464580 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
215217</ div > < div class ="content hidden option-2 ">
216- < pre class ="highlightjs highlight "> < code class ="language-kotlin hljs " data-lang ="kotlin " id ="x8b7f49c6c4364590 "> fun main(args: Array<String>) {
218+ < pre class ="highlightjs highlight "> < code class ="language-kotlin hljs " data-lang ="kotlin " id ="xb582be422e78448a "> fun main(args: Array<String>) {
217219 runApp(args) {
218220 install(AvajeInjectModule.of()) < b class ="conum "> (1)</ b >
219221
220222 mvc(MyController::class) < b class ="conum "> (2)</ b >
221223 }
222- }</ code > < button class ="clipboard " data-clipboard-target ="#x8b7f49c6c4364590 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
224+ }</ code > < button class ="clipboard " data-clipboard-target ="#xb582be422e78448a "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
223225</ div > </ div >
224226
225227< div class ="colist arabic ">
@@ -405,5 +407,33 @@ <h5 id="avaje-inject-mvc-routes"><a class="anchor" href="#avaje-inject-mvc-route
405407 }
406408 } ) ;
407409</ script >
410+
411+ < script src ="https://cdn.jsdelivr.net/npm/@docsearch/js@3 "> </ script >
412+
413+ < script >
414+ document . addEventListener ( 'DOMContentLoaded' , function ( ) {
415+ // 1. Find Asciidoctor's auto-generated TOC
416+ const toc = document . getElementById ( 'toc' ) ;
417+
418+ if ( toc ) {
419+ // 2. Create the search container dynamically
420+ const searchContainer = document . createElement ( 'div' ) ;
421+ searchContainer . id = 'docsearch' ;
422+
423+ // 3. Inject it at the very top of the TOC, above the title
424+ toc . insertBefore ( searchContainer , toc . firstChild ) ;
425+
426+ // 4. Initialize Algolia into that new container
427+ docsearch ( {
428+ appId : '9U2WK2CSJ7' ,
429+ apiKey : '113e159f5c587fdac629948dd80dd993' ,
430+ indexName : 'jooby' ,
431+ container : '#docsearch'
432+ } ) ;
433+ } else {
434+ console . warn ( "Could not find the #toc element to inject the search bar." ) ;
435+ }
436+ } ) ;
437+ </ script >
408438</ body >
409439</ html >
0 commit comments