This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.example.demo.config; | |
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties; | |
import org.springframework.boot.context.properties.ConfigurationProperties; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; | |
import org.springframework.context.annotation.Lazy; | |
import org.springframework.context.annotation.Primary; | |
import javax.sql.DataSource; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JsonProcedureExtractor extractor = JsonProcedureExtractor.newBuilder() | |
.withParams( | |
new JdbcParameter<Long>("maxValue", JdbcParamType.IN_NUMBER, Long.valueOf(1)), | |
new JdbcParameter<Object>("maxValue", JdbcParamType.OUT_CURSOR) | |
) | |
.withStoredProcedure("{call terra.pkg_tsod3_inv.report(?,?,?)}") | |
.build(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HttpPost request = new HttpPost(m.getRequestURL()); | |
request.addHeader("content-type", "application/json; charset=UTF-8"); | |
System.out.println(m.getAuthKey()); | |
request.addHeader("Authorization", "Basic " + m.getAuthKey()); | |
StringEntity params = new StringEntity(m.getBody(),"UTF-8"); | |
request.setEntity(params); | |
HttpResponse response = httpClient.execute(request); |
NewerOlder