Skip to content

Commit de33772

Browse files
committed
digital double logic
1 parent 9fc0d90 commit de33772

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

java-ai/src/main/java/oracleai/DigitalDoubleService.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package oracleai;
22

3+
import org.springframework.beans.factory.annotation.Autowired;
34
import org.springframework.stereotype.Service;
45
import org.springframework.web.client.RestTemplate;
56
import org.springframework.http.HttpEntity;
@@ -13,11 +14,12 @@
1314
@Service
1415
public class DigitalDoubleService {
1516

16-
private final RestTemplate restTemplate;
17-
18-
public DigitalDoubleService(RestTemplate restTemplate) {
19-
this.restTemplate = restTemplate;
20-
}
17+
// private final RestTemplate restTemplate;
18+
//
19+
// @Autowired
20+
// public DigitalDoubleService(RestTemplate restTemplate) {
21+
// this.restTemplate = restTemplate;
22+
// }
2123

2224
public void updateDigitalDoubleData(DigitalDoubleDownloadInfo info) {
2325
String url = "https://rddainsuh6u1okc-ragdb.adb.us-ashburn-1.oraclecloudapps.com/ords/omlopsuser/update_digital_double_data/";
@@ -39,8 +41,7 @@ public void updateDigitalDoubleData(DigitalDoubleDownloadInfo info) {
3941

4042
// Create the HttpEntity that includes headers and the body
4143
HttpEntity<Map<String, Object>> entity = new HttpEntity<>(requestBody, headers);
42-
43-
// Make the POST request
44+
RestTemplate restTemplate = new RestTemplate();
4445
ResponseEntity<String> response = restTemplate.postForEntity(url, entity, String.class);
4546

4647
// Handle the response (optional)

0 commit comments

Comments
 (0)