Skip to content

Commit fb446d8

Browse files
Getting started fixes
1 parent a57755b commit fb446d8

File tree

3 files changed

+31
-11
lines changed

3 files changed

+31
-11
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
// tag::simple-connect[]
2+
// tag::imports[]
3+
import com.couchbase.client.java.*;
4+
// end::imports[]
5+
6+
public class SimpleConnect {
7+
static String connectionString = "couchbases://example.com";
8+
static String username = "username";
9+
static String password = "Password!123";
10+
static String bucketName = "travel-sample";
11+
12+
public static void main(String... args) {
13+
// tag::connect-string[]
14+
// Alternatively, connect without customizing the cluster envionrment.
15+
Cluster cluster = Cluster.connect(connectionString, username, password);
16+
// end::connect-string[]
17+
cluster.disconnect();
18+
}
19+
}
20+
// end::simple-connect[]

modules/hello-world/pages/sample-application.adoc

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
= Quickstart in Couchbase with Spring Boot and Java
2+
:page-toclevels: 2
23
:description: Quickstart app to build a REST API using Couchbase Capella in Java using Spring Boot
34
:page-aliases: ROOT:sample-application,ROOT:tutorial4,ROOT:sample-app-backend
45

@@ -9,15 +10,13 @@
910
Discover how to program interactions with Couchbase via the Data, Query, and Search services.
1011

1112

12-
After you have navigated through
13-
14-
[signing up to Capella],
15-
if {} is entered as your chosen language, you will be pointed to a clonable quickstart app on GitHub.
13+
After you have navigated through https://cloud.couchbase.com/sign-up[signing up to Capella],
14+
if {name_platform} is entered as your chosen language, you will be pointed to a clonable quickstart app on GitHub.
1615
If you were not, you can still find it https://github.com/couchbase-examples/java-springboot-quickstart[here].
1716

1817

1918
Often, the first step developers take after creating their database is to create a REST API that can perform Create, Read, Update, and Delete (CRUD) operations for that database.
20-
The https://github.com/couchbase-examples/java-springboot-quickstart[quickstart repo] is designed to teach you and give you a starter project (in Java using Spring Boot) to generate such a REST API.
19+
The https://github.com/couchbase-examples/java-springboot-quickstart[quickstart project] is designed to teach you and give you a starter project (in Java using Spring Boot) to generate such a REST API.
2120
After you have loaded the travel-sample bucket in your database, you can run this application which is a REST API with Swagger documentation so that you can learn:
2221

2322
. How to create, read, update, and delete documents using xref:howto:kv-operations[Key-Value operations].

modules/hello-world/pages/start-using-sdk.adoc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,12 @@ In production, Couchbase strongly recommends setting up users with more granular
127127

128128

129129
== Installation
130+
130131
We recommend running the latest Java LTS version (i.e. at the time of writing JDK 21) with the highest patch version available.
131132
// Other supported Java versions will work, too.
132133
Couchbase publishes all stable artifacts to https://central.sonatype.com/namespace/com.couchbase.client[Maven Central].
133134

134-
The latest version of 3.7.x is https://central.sonatype.com/artifact/com.couchbase.client/java-client/{sdk_current_version}/jar[{sdk_current_version}].
135+
The latest version of {sdk_dot_minor}.x is https://central.sonatype.com/artifact/com.couchbase.client/java-client/{sdk_current_version}/jar[{sdk_current_version}].
135136

136137
// tag::quick-install[]
137138
More details of the installation process are in the
@@ -181,7 +182,7 @@ If you're all set up and in a real hurry, just grab this code sample and add in
181182
[%collapsible]
182183
====
183184
....
184-
include::devguide:example$scala/Cloud.scala[]
185+
include::devguide:example$java/StartUsingCapella.java[]
185186
....
186187
====
187188

@@ -212,7 +213,7 @@ Self-Managed Couchbase Server::
212213
213214
[source,java]
214215
----
215-
include::example$java/StartUsing.java[tags=connect-info,indent=0]
216+
include::devguide:example$java/StartUsing.java[tags=connect-info,indent=0]
216217
----
217218
--
218219
@@ -596,7 +597,7 @@ or the xref:{version-server}@server:manage:manage-settings/install-sample-bucket
596597
597598
[source.try-it,java]
598599
----
599-
include::example$StartUsing.java[tags=start-using,indent=0]
600+
include:devguide::example$StartUsing.java[tags=start-using,indent=0]
600601
----
601602
--
602603
====
@@ -718,7 +719,7 @@ Local Couchbase Server::
718719
719720
[source,java]
720721
----
721-
include::example$StartUsing.java[tags=connect-info,indent=0]
722+
include::devguide:example$StartUsing.java[tags=connect-info,indent=0]
722723
----
723724
--
724725
====
@@ -762,7 +763,7 @@ This example shows how to connect and customize the xref:howtos:managing-connect
762763
763764
[source,java]
764765
----
765-
include::example$StartUsing.java[tags=connect-env,indent=0]
766+
include::devguide:example$StartUsing.java[tags=connect-env,indent=0]
766767
----
767768
--
768769
====

0 commit comments

Comments
 (0)