Skip to content

Commit 993d0e5

Browse files
committed
fixing links in the db-scheduler doc
Signed-off-by: Lewis Birks <[email protected]>
1 parent 8761a90 commit 993d0e5

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

docs/asciidoc/modules/db-scheduler.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ import io.jooby.dbscheduler.DbSchedulerModule
4040
=== Tasks
4141

4242
Tasks are created as described in https://github.com/kagkarlsson/db-scheduler[db-scheduler documentation]. Optionally,
43-
you can annotate a method with the javadoc:dbscheduler.Scheduled[] annotation:
43+
you can annotate a method with the javadoc:dbscheduler.Scheduled[artifact="jooby-db-scheduler", package="jooby.dbscheduler"] annotation:
4444

4545
.Sample Job
4646
[source, java, role="primary"]
@@ -91,7 +91,7 @@ A task method must follow these rules:
9191

9292
=== Scheduled
9393

94-
The javadoc:dbscheduler.Scheduled[] annotation supports simple and cron triggers as well as property references:
94+
The javadoc:dbscheduler.Scheduled[artifact="jooby-db-scheduler", package="jooby.dbscheduler"] annotation supports simple and cron triggers as well as property references:
9595

9696
.Same as .fixedDelay(Duration) with duration.
9797
----
@@ -127,8 +127,8 @@ The `mytask.trigger` must be defined in your application property file. It could
127127

128128
=== Configuration
129129

130-
Configuration from properties files is fully supported, just need to add javadoc:dbscheduler.DbSchedulerProperties[] properties to your
131-
application configuration file:
130+
Configuration from properties files is fully supported, just need to add javadoc:dbscheduler.DbSchedulerProperties[artifact="jooby-db-scheduler", package="jooby.dbscheduler"]
131+
properties to your application configuration file:
132132

133133
.Options
134134
[source, properties]

docs/src/main/java/io/jooby/adoc/JavadocProcessor.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,14 @@ public PhraseNode process(StructuralNode parent, String clazz, Map<String, Objec
9898

9999
private static StringBuilder generateLink(Map<String, Object> attributes) {
100100
String artifact = (String) attributes.getOrDefault("artifact", "jooby");
101+
String packageName = (String) attributes.get("package");
102+
if (packageName == null) {
103+
packageName = artifact.replace('-', '.');
104+
}
101105
return new StringBuilder("https://www.javadoc.io/doc/io.jooby/")
102106
.append(artifact)
103107
.append("/latest/io.")
104-
.append(artifact.replace('-', '.'))
108+
.append(packageName)
105109
.append("/io/jooby/");
106110
}
107111
}

0 commit comments

Comments
 (0)