You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
on self-driving Oracle Autonomous Database technology to deliver automated patching, upgrades, and tuning, including
9
9
performing all routine database maintenance tasks while the system is running, without human intervention.
10
10
11
-
Maven coordinates, using <<getting-started.adoc#bill-of-materials, Spring Cloud OCI BOM>>:
11
+
Maven coordinates:
12
12
13
13
[source,xml]
14
14
----
@@ -30,19 +30,12 @@ dependencies {
30
30
=== Using Autonomous Database
31
31
32
32
The starter automatically configures and registers an `AutonomousDb` bean in the Spring application context.
33
-
The `AutonomousDb` bean (link[Javadoc]) can be used to create an Autonomous Database, get details of an Autonomous Database,
33
+
The `AutonomousDb` bean (https://oracle.github.io/spring-cloud-oci/{project-version}/javadocs/com/oracle/cloud/spring/adb/package-summary.html[Javadoc]) can be used to create an Autonomous Database, get details of an Autonomous Database,
34
34
delete an Autonomous Database and generate a wallet for an Autonomous Database.
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/db_starters.adoc
+113-7Lines changed: 113 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,10 @@
1
1
// Copyright (c) 2024, Oracle and/or its affiliates.
2
2
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
3
3
4
-
[#AQ/JMS]
5
-
== AQ/JMS
4
+
[[database-spring-starters]]
5
+
== Database Spring Boot Starters
6
+
7
+
=== AQ/JMS
6
8
7
9
This starter provides support for Oracle Transactional Event Queues (TxEventQ) and Oracle Advanced Queuing (AQ) as Java Message Service (JMS) providers. It depends on the Universal Connection Pool (UCP) starter.
8
10
@@ -28,13 +30,13 @@ dependencies {
28
30
}
29
31
----
30
32
31
-
=== Using AQ/JMS
33
+
==== Using AQ/JMS
32
34
33
35
To configure your application to use Oracle Transactional Event Queues or Oracle Advanced Queuing, you must annotate you application with the `@EnableJms` annotation, and create the
34
36
two following beans:
35
37
36
38
* A `JmsListenerContainerFactory<?>` bean, which can be created as shown in the following example. Note that you can override settings if you need to. Also, note that the name of the method defines the name of the factory, which you will use when creating JMS listeners.
37
-
* A `MessageConverter` bean to map objects of your class representing the payload into a text based format (like JSON) that can be used in the actual messages.
39
+
* A `MessageConverter` bean to map objects of your class representing the payload into a text based format (like JSON) that can be used in the actual messages.
38
40
39
41
**Note**: Any queues or topics that you want to use must be pre-created in the database. See [Sample Code](https://www.oracle.com/database/advanced-queuing/#rc30sample-code) for
40
42
examples.
@@ -71,19 +73,19 @@ public class JmsSampleApplication {
71
73
// You could override some of Boot's defaults here if necessary
72
74
return factory;
73
75
}
74
-
76
+
75
77
@Bean
76
78
public MessageConverter jacksonJmsMessageConverter() {
77
79
MappingJackson2MessageConverter converter = new MappingJackson2MessageConverter();
**Note**: The starter uses the configuration for `spring.datasource` as the connection details for the Oracle Database hosting the queues and topics. If you wish to use a different configuration, you must use a named configuration, for example `spring.datasource.txeventq` and use Java configuration and annotate the configuration with the standard Spring `@Qualifier` annotation, specifying the correct name, for example `txevevntq`.
122
+
123
+
=== Universal Connection Pool
124
+
125
+
This starter provides a connection (data source) to an Oracle Database using Universal Connection Pool, which provides an efficient way to use database connections.
126
+
127
+
To add this starter to your project, add this Maven dependency:
An Oracle data source is injected into your application and can be used normally. You must configure the data source as shown below, and you should also add either Spring Data JDBC or Spring Data JPA to your project.
150
+
151
+
To configure the data source, provide a `spring.datasource` object in your Spring `application.yaml`, or equivalent, as shown in the following example. The `oracleucp` entry is optional, and can be used to fine tune the configuration of the connection pool, if desired. For details of available settings, refer to the [JavaDoc](https://docs.oracle.com/en/database/oracle/oracle-database/21/jjuar/oracle/ucp/jdbc/UCPDataSource.html).
The `spring.datasource.url` can be in the basic format (as previously shown), or in TNS format if your application uses Transparent Network Substrate (TNS).
179
+
180
+
Note that the connections to the database use the `DEDICATED` server by default. If you wish to use `SHARED` or `POOLED`, you can append that to the basic URL, or add it to the TNS names entry. For example, to use database resident pooled connections, you would change the URL shown in the previous example to the following:
181
+
182
+
[source,yaml]
183
+
----
184
+
datasource:
185
+
url: jdbc:oracle:thin:@//myhost:1521/pdb1:pooled
186
+
----
187
+
188
+
If you are using TNS, add `server=pooled` to the `connect_data`. For example:
189
+
190
+
[source,text]
191
+
----
192
+
mydb_tp = (description=
193
+
(retry_count=20)
194
+
(retry_delay=3)
195
+
(address=(protocol=tcps)(port=1521)(host=myhost))
196
+
(connect_data=(service_name=pdb1)(server=pooled))
197
+
(security=(ssl_server_dn_match=yes)))
198
+
----
199
+
200
+
If you prefer to use Java configuration, the data source can be configured as shown in the following example:
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/function.adoc
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
-
// Copyright (c) 2023, Oracle and/or its affiliates.
1
+
// Copyright (c) 2023, 2024, Oracle and/or its affiliates.
2
2
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
3
3
4
4
[#cloud-function]
5
5
== Cloud Functions
6
6
7
7
https://docs.oracle.com/en-us/iaas/Content/Functions/Concepts/functionsoverview.htm[OCI Functions] is a fully managed, multi-tenant, highly scalable, on-demand, Functions-as-a-Service platform. It is built on enterprise-grade Oracle Cloud Infrastructure and powered by the Fn Project open source engine. Use OCI Functions when you want to focus on writing code to meet business needs. The Spring Cloud module for OCI Functions allows to invoke an OCI Function.
8
-
A Spring Boot starter is provided to auto-configure the Function component.
8
+
A Spring Boot starter is provided to autoconfigure the Function component.
9
9
10
-
Maven coordinates, using <<getting-started.adoc#bill-of-materials, Spring Cloud OCI BOM>>:
10
+
Maven coordinates:
11
11
12
12
[source,xml]
13
13
----
@@ -29,7 +29,7 @@ dependencies {
29
29
=== Using Cloud Functions
30
30
31
31
The starter automatically configures and registers a `Function` bean in the Spring application context.
32
-
The `Function` bean (link[Javadoc]) can be used to invoke a function with parameter inputs 'functionOcid' and 'endpoint'
32
+
The `Function` bean (https://oracle.github.io/spring-cloud-oci/{project-version}/javadocs/com/oracle/cloud/spring/function/package-summary.html[Javadoc]) can be used to invoke a function with parameter inputs 'functionOcid' and 'endpoint'
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/genai.adoc
+3-5Lines changed: 3 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@
6
6
7
7
https://docs.oracle.com/en-us/iaas/Content/generative-ai/home.htm[OCI Generative AI] is a fully managed service that provides a set of state-of-the-art, customizable large language models (LLMs) that cover a wide range of use cases, including chat and creating text embeddings.
8
8
9
-
Maven coordinates, using <<getting-started.adoc#bill-of-materials, Spring Cloud OCI BOM>>:
9
+
Maven coordinates:
10
10
11
11
[source,xml]
12
12
----
@@ -28,12 +28,11 @@ dependencies {
28
28
=== Using Generative AI Chat
29
29
30
30
The starter configures and registers a `ChatModel` bean in the Spring application context.
31
-
The `ChatModel` bean (link[Javadoc]) can be used to interact with OCI Generative AI Chat Models.
31
+
The `ChatModel` bean (https://oracle.github.io/spring-cloud-oci/{project-version}/javadocs/com/oracle/cloud/spring/genai/package-summary.html[Javadoc]) can be used to interact with OCI Generative AI Chat Models.
32
32
33
33
[source,java]
34
34
----
35
35
@Autowired
36
-
@Autowired
37
36
private ChatModel chatModel;
38
37
39
38
public void embed() {
@@ -44,7 +43,7 @@ public void embed() {
44
43
=== Using Generative AI Embedding
45
44
46
45
The starter configures and registers an `EmbeddingModel` bean in the Spring application context.
47
-
The `EmbeddingModel` bean (link[Javadoc]) can be used to create text embeddings using OCI Generative AI Embedding Models.
46
+
The `EmbeddingModel` bean (https://oracle.github.io/spring-cloud-oci/{project-version}/javadocs/com/oracle/cloud/spring/genai/package-summary.html[Javadoc]) can be used to create text embeddings using OCI Generative AI Embedding Models.
48
47
49
48
[source,java]
50
49
----
@@ -82,7 +81,6 @@ The Spring Boot Starter for Oracle Cloud Generative AI provides the following co
82
81
83
82
|===
84
83
85
-
86
84
=== Sample
87
85
88
86
A sample application provided https://github.com/oracle/spring-cloud-oci/tree/main/spring-cloud-oci-samples/spring-cloud-oci-gen-ai-sample[here] contains the examples to demonstrates the usage of OCI Spring Cloud Generative AI module.
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/index.adoc
+9-11Lines changed: 9 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -6,37 +6,35 @@
6
6
7
7
include::_attributes.adoc[]
8
8
9
-
Documentation for version *{project-version}*
9
+
Documentation for version *+{project-version}+*
10
10
11
11
== Introduction
12
12
13
13
Spring Cloud for OCI, part of the Spring Cloud umbrella project, eases the integration with hosted OCI Services. It offers a convenient way to interact with OCI provided services using well-known Spring idioms and APIs, such as storage resources. Developers can build their application around the hosted services without having to worry about infrastructure or maintenance.
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/logging.adoc
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
-
// Copyright (c) 2023, Oracle and/or its affiliates.
1
+
// Copyright (c) 2023, 2024, Oracle and/or its affiliates.
2
2
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
3
3
4
4
[#cloud-logging]
5
5
== Cloud Logging
6
6
7
7
https://docs.oracle.com/en-us/iaas/Content/Logging/home.htm[OCI Logging] service is a highly scalable and fully managed single pane of glass for all the logs in your tenancy. Logging provides access to logs from OCI resources. These logs include critical diagnostic information that describes how resources are performing and being accessed. Use Logging to enable, manage, and search Audit, Service, and Custom logs. The Spring Cloud module for OCI Logging allows ingesting logs associated with a logId.
8
-
A Spring Boot starter is provided to auto-configure the Logging component.
8
+
A Spring Boot starter is provided to autoconfigure the Logging component.
9
9
10
-
Maven coordinates, using <<getting-started.adoc#bill-of-materials, Spring Cloud OCI BOM>>:
10
+
Maven coordinates::
11
11
12
12
[source,xml]
13
13
----
@@ -29,7 +29,7 @@ dependencies {
29
29
=== Using Cloud Logging
30
30
31
31
The starter automatically configures and registers a `Logging` bean in the Spring application context.
32
-
The `Logging` bean (link[Javadoc]) can be used to ingest logs associated with a logId specified in the property `spring.cloud.oci.logging.logId` within the application configuration file
32
+
The `Logging` bean (https://oracle.github.io/spring-cloud-oci/{project-version}/javadocs/com/oracle/cloud/spring/logging/package-summary.html[Javadoc]) can be used to ingest logs associated with a logId specified in the property `spring.cloud.oci.logging.logId` within the application configuration file
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/notifications.adoc
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
-
// Copyright (c) 2023, Oracle and/or its affiliates.
1
+
// Copyright (c) 2023, 2024, Oracle and/or its affiliates.
2
2
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
3
3
4
4
[#cloud-notifications]
5
5
== Cloud Notifications
6
6
7
7
https://www.oracle.com/in/devops/notifications/[OCI Notifications] is a highly available, low latency publish/subscribe (pub/sub) service that sends alerts and messages to Oracle Cloud Functions, email, SMS, and message delivery partners, including Slack, PagerDuty and custom HTTPS endpoint. Spring Cloud module for Oracle Cloud Notifications allows you to create a Topic, then create and publish messages to multiple subscription types such as Oracle Cloud Functions, email, SMS, Slack, PagerDuty and custom HTTPS endpoint.
8
-
A Spring Boot starter is provided to auto-configure the various Notification components.
8
+
A Spring Boot starter is provided to autoconfigure the various Notification components.
9
9
10
-
Maven coordinates, using <<getting-started.adoc#bill-of-materials, Spring Cloud OCI BOM>>:
10
+
Maven coordinates:
11
11
12
12
[source,xml]
13
13
----
@@ -29,7 +29,7 @@ dependencies {
29
29
=== Using Cloud Notifications
30
30
31
31
The starter automatically configures and registers a `Notification` bean in the Spring application context.
32
-
The `Notification` bean (link[Javadoc]) can be used to create a Topic, create, list, get a Subscription, and publish messages to the Subscriptions in a Topic.
32
+
The `Notification` bean (https://oracle.github.io/spring-cloud-oci/{project-version}/javadocs/com/oracle/cloud/spring/notification/package-summary.html[Javadoc]) can be used to create a Topic, create, list, get a Subscription, and publish messages to the Subscriptions in a Topic.
Copy file name to clipboardExpand all lines: docs/src/main/asciidoc/queues.adoc
+4-4Lines changed: 4 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
-
// Copyright (c) 2023, Oracle and/or its affiliates.
1
+
// Copyright (c) 2023, 2024, Oracle and/or its affiliates.
2
2
// Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
3
3
4
4
[#cloud-queues]
5
5
== Cloud Queues
6
6
7
7
https://docs.oracle.com/en-us/iaas/Content/queue/home.htm[OCI Queues] is a highly available, low latency publish/subscribe (pub/sub) service, handles high volume transactional data that requires independently processed messages without loss or duplication. Spring Cloud module for Oracle Cloud Queues allows you to create a queue, get a queue, list queues, delete a queue, put messages, get messages, update messages and delete a message.
8
-
A Spring Boot starter is provided to auto-configure the various Queue components.
8
+
A Spring Boot starter is provided to autoconfigure the various Queue components.
9
9
10
-
Maven coordinates, using <<getting-started.adoc#bill-of-materials, Spring Cloud OCI BOM>>:
10
+
Maven coordinates:
11
11
12
12
[source,xml]
13
13
----
@@ -29,7 +29,7 @@ dependencies {
29
29
=== Using Cloud Queues
30
30
31
31
The starter automatically configures and registers a `Queue` bean in the Spring application context.
32
-
The `Queue` bean (link[Javadoc]) can be used to create a queue, get a queue, list queues, delete a queue, put messages, get messages, update messages and delete a message.
32
+
The `Queue` bean (https://oracle.github.io/spring-cloud-oci/{project-version}/javadocs/com/oracle/cloud/spring/queue/package-summary.html[Javadoc]) can be used to create a queue, get a queue, list queues, delete a queue, put messages, get messages, update messages and delete a message.
0 commit comments