File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
java-ai/src/main/java/oracleai Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change 1
1
package oracleai ;
2
2
3
+ import org .springframework .beans .factory .annotation .Autowired ;
3
4
import org .springframework .stereotype .Service ;
4
5
import org .springframework .web .client .RestTemplate ;
5
6
import org .springframework .http .HttpEntity ;
13
14
@ Service
14
15
public class DigitalDoubleService {
15
16
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
+ // }
21
23
22
24
public void updateDigitalDoubleData (DigitalDoubleDownloadInfo info ) {
23
25
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) {
39
41
40
42
// Create the HttpEntity that includes headers and the body
41
43
HttpEntity <Map <String , Object >> entity = new HttpEntity <>(requestBody , headers );
42
-
43
- // Make the POST request
44
+ RestTemplate restTemplate = new RestTemplate ();
44
45
ResponseEntity <String > response = restTemplate .postForEntity (url , entity , String .class );
45
46
46
47
// Handle the response (optional)
You can’t perform that action at this time.
0 commit comments