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.
@@ -53,13 +55,13 @@ <h4 id="avaje-inject"><a class="anchor" href="#avaje-inject"></a><a class="link"
5355
5456
5557< 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 ">
56- < pre class ="highlightjs highlight "> < code class ="language-xml hljs " data-lang ="xml " id ="x7423de2fe954009 "> <dependency>
58+ < pre class ="highlightjs highlight "> < code class ="language-xml hljs " data-lang ="xml " id ="x45e58ae388a64876 "> <dependency>
5759 <groupId>io.jooby</groupId>
5860 <artifactId>jooby-avaje-inject</artifactId>
5961 <version>4.0.16</version>
60- </dependency></ code > < button class ="clipboard " data-clipboard-target ="#x7423de2fe954009 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
62+ </dependency></ code > < button class ="clipboard " data-clipboard-target ="#x45e58ae388a64876 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
6163</ div > < div class ="content hidden option-2 ">
62- < pre class ="highlightjs highlight "> < code class ="language-gradle hljs " data-lang ="gradle " id ="xa739e81efb5f4140 "> implementation 'io.jooby:jooby-avaje-inject:4.0.16'</ code > < button class ="clipboard " data-clipboard-target ="#xa739e81efb5f4140 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
64+ < pre class ="highlightjs highlight "> < code class ="language-gradle hljs " data-lang ="gradle " id ="x37157e30713844e7 "> implementation 'io.jooby:jooby-avaje-inject:4.0.16'</ code > < button class ="clipboard " data-clipboard-target ="#x37157e30713844e7 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
6365</ div > </ div >
6466
6567< div class ="paragraph ">
@@ -69,7 +71,7 @@ <h4 id="avaje-inject"><a class="anchor" href="#avaje-inject"></a><a class="link"
6971
7072
7173< 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 ">
72- < pre class ="highlightjs highlight "> < code class ="language-xml hljs " data-lang ="xml " id ="x57fcd9f8d69d4429 "> <build>
74+ < pre class ="highlightjs highlight "> < code class ="language-xml hljs " data-lang ="xml " id ="x827139c1d7424206 "> <build>
7375 <plugins>
7476 <plugin>
7577 <groupId>org.apache.maven.plugins</groupId>
@@ -88,15 +90,15 @@ <h4 id="avaje-inject"><a class="anchor" href="#avaje-inject"></a><a class="link"
8890 </configuration>
8991 </plugin>
9092 </plugins>
91- </build></ code > < button class ="clipboard " data-clipboard-target ="#x57fcd9f8d69d4429 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
93+ </build></ code > < button class ="clipboard " data-clipboard-target ="#x827139c1d7424206 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
9294</ div > < div class ="content hidden option-2 ">
93- < pre class ="highlightjs highlight "> < code class ="language-kotlin hljs " data-lang ="kotlin " id ="xa476ee1c8a164158 "> plugins {
95+ < pre class ="highlightjs highlight "> < code class ="language-kotlin hljs " data-lang ="kotlin " id ="xe8d5444ea50843d4 "> plugins {
9496 id "org.jetbrains.kotlin.kapt" version "1.9.10"
9597}
9698
9799dependencies {
98100 kapt 'io.avaje:avaje-inject-generator:{avaje.inject.version}'
99- }</ code > < button class ="clipboard " data-clipboard-target ="#xa476ee1c8a164158 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
101+ }</ code > < button class ="clipboard " data-clipboard-target ="#xe8d5444ea50843d4 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
100102</ div > </ div >
101103
102104< div class ="admonitionblock note ">
@@ -120,7 +122,7 @@ <h4 id="avaje-inject"><a class="anchor" href="#avaje-inject"></a><a class="link"
120122< div class ="title "> Installing Avaje Inject</ div >
121123
122124< 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 ">
123- < pre class ="highlightjs highlight "> < code class ="language-java hljs " data-lang ="java " id ="xb5e242cd45ca4a9b "> public class App extends Jooby {
125+ < pre class ="highlightjs highlight "> < code class ="language-java hljs " data-lang ="java " id ="xbd274c2499a3401d "> public class App extends Jooby {
124126
125127 {
126128 install(AvajeInjectModule.of()); < b class ="conum "> (1)</ b >
@@ -134,9 +136,9 @@ <h4 id="avaje-inject"><a class="anchor" href="#avaje-inject"></a><a class="link"
134136 public static void main(String[] args) {
135137 runApp(args, App::new);
136138 }
137- }</ code > < button class ="clipboard " data-clipboard-target ="#xb5e242cd45ca4a9b "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
139+ }</ code > < button class ="clipboard " data-clipboard-target ="#xbd274c2499a3401d "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
138140</ div > < div class ="content hidden option-2 ">
139- < pre class ="highlightjs highlight "> < code class ="language-kotlin hljs " data-lang ="kotlin " id ="x14d6c59bf5744f04 "> fun main(args: Array<String>) {
141+ < pre class ="highlightjs highlight "> < code class ="language-kotlin hljs " data-lang ="kotlin " id ="x844ae22dee247c1 "> fun main(args: Array<String>) {
140142 runApp(args) {
141143 install(AvajeInjectModule.of()) < b class ="conum "> (1)</ b >
142144
@@ -145,7 +147,7 @@ <h4 id="avaje-inject"><a class="anchor" href="#avaje-inject"></a><a class="link"
145147 service.doSomething()
146148 }
147149 }
148- }</ code > < button class ="clipboard " data-clipboard-target ="#x14d6c59bf5744f04 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
150+ }</ code > < button class ="clipboard " data-clipboard-target ="#x844ae22dee247c1 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
149151</ div > </ div >
150152
151153< div class ="colist arabic ">
@@ -166,27 +168,27 @@ <h5 id="avaje-inject-property-injection"><a class="anchor" href="#avaje-inject-p
166168< div class ="listingblock ">
167169< div class ="title "> application.conf</ div >
168170< div class ="content ">
169- < pre class ="highlightjs highlight "> < code class ="language-bash hljs " data-lang ="bash " id ="xd9096b02cda342f6 "> currency = USD</ code > < button class ="clipboard " data-clipboard-target ="#xd9096b02cda342f6 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
171+ < pre class ="highlightjs highlight "> < code class ="language-bash hljs " data-lang ="bash " id ="xe405ea221c1f4014 "> currency = USD</ code > < button class ="clipboard " data-clipboard-target ="#xe405ea221c1f4014 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
170172</ div >
171173</ div >
172174< div class ="listingblock primary ">
173175
174176
175177< 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 ">
176- < pre class ="highlightjs highlight "> < code class ="language-java hljs " data-lang ="java " id ="x63f7f190432c4093 "> @Singleton
178+ < pre class ="highlightjs highlight "> < code class ="language-java hljs " data-lang ="java " id ="x4d594307427045bd "> @Singleton
177179public class BillingService {
178180
179181 @Inject
180182 public BillingService(@External @Named("currency") String currency) {
181183 ...
182184 }
183185
184- }</ code > < button class ="clipboard " data-clipboard-target ="#x63f7f190432c4093 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
186+ }</ code > < button class ="clipboard " data-clipboard-target ="#x4d594307427045bd "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
185187</ div > < div class ="content hidden option-2 ">
186- < pre class ="highlightjs highlight "> < code class ="language-kotlin hljs " data-lang ="kotlin " id ="xf0111e11b23d42b2 "> @Singleton
188+ < pre class ="highlightjs highlight "> < code class ="language-kotlin hljs " data-lang ="kotlin " id ="x1f10e7f50f804df3 "> @Singleton
187189class BillingService @Inject constructor(@External @Named("currency") currency: String) {
188190 ...
189- }</ code > < button class ="clipboard " data-clipboard-target ="#xf0111e11b23d42b2 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
191+ }</ code > < button class ="clipboard " data-clipboard-target ="#x1f10e7f50f804df3 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
190192</ div > </ div >
191193
192194</ div >
@@ -199,7 +201,7 @@ <h5 id="avaje-inject-mvc-routes"><a class="anchor" href="#avaje-inject-mvc-route
199201< div class ="title "> MVC and Avaje Inject</ div >
200202
201203< 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 ">
202- < pre class ="highlightjs highlight "> < code class ="language-java hljs " data-lang ="java " id ="x4ef4783b19b947a0 "> public class App extends Jooby {
204+ < pre class ="highlightjs highlight "> < code class ="language-java hljs " data-lang ="java " id ="xadd7f02e8cef432b "> public class App extends Jooby {
203205
204206 {
205207 install(AvajeInjectModule.of()); < b class ="conum "> (1)</ b >
@@ -210,15 +212,15 @@ <h5 id="avaje-inject-mvc-routes"><a class="anchor" href="#avaje-inject-mvc-route
210212 public static void main(String[] args) {
211213 runApp(args, App::new);
212214 }
213- }</ code > < button class ="clipboard " data-clipboard-target ="#x4ef4783b19b947a0 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
215+ }</ code > < button class ="clipboard " data-clipboard-target ="#xadd7f02e8cef432b "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
214216</ div > < div class ="content hidden option-2 ">
215- < pre class ="highlightjs highlight "> < code class ="language-kotlin hljs " data-lang ="kotlin " id ="xc32ac633393442fc "> fun main(args: Array<String>) {
217+ < pre class ="highlightjs highlight "> < code class ="language-kotlin hljs " data-lang ="kotlin " id ="x4605d4299a744ba5 "> fun main(args: Array<String>) {
216218 runApp(args) {
217219 install(AvajeInjectModule.of()) < b class ="conum "> (1)</ b >
218220
219221 mvc(MyController::class) < b class ="conum "> (2)</ b >
220222 }
221- }</ code > < button class ="clipboard " data-clipboard-target ="#xc32ac633393442fc "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
223+ }</ code > < button class ="clipboard " data-clipboard-target ="#x4605d4299a744ba5 "> < img src ="/../../images/clippy.svg " class ="clippy " width ="13 " alt ="Copy to clipboard "> </ button > </ pre >
222224</ div > </ div >
223225
224226< div class ="colist arabic ">
@@ -404,5 +406,33 @@ <h5 id="avaje-inject-mvc-routes"><a class="anchor" href="#avaje-inject-mvc-route
404406 }
405407 } ) ;
406408</ script >
409+
410+ < script src ="https://cdn.jsdelivr.net/npm/@docsearch/js@3 "> </ script >
411+
412+ < script >
413+ document . addEventListener ( 'DOMContentLoaded' , function ( ) {
414+ // 1. Find Asciidoctor's auto-generated TOC
415+ const toc = document . getElementById ( 'toc' ) ;
416+
417+ if ( toc ) {
418+ // 2. Create the search container dynamically
419+ const searchContainer = document . createElement ( 'div' ) ;
420+ searchContainer . id = 'docsearch' ;
421+
422+ // 3. Inject it at the very top of the TOC, above the title
423+ toc . insertBefore ( searchContainer , toc . firstChild ) ;
424+
425+ // 4. Initialize Algolia into that new container
426+ docsearch ( {
427+ appId : '9U2WK2CSJ7' ,
428+ apiKey : '113e159f5c587fdac629948dd80dd993' ,
429+ indexName : 'jooby' ,
430+ container : '#docsearch'
431+ } ) ;
432+ } else {
433+ console . warn ( "Could not find the #toc element to inject the search bar." ) ;
434+ }
435+ } ) ;
436+ </ script >
407437</ body >
408438</ html >
0 commit comments