JsonObject json;
try {
JsonElement element = new JsonParser().parse(
new InputStreamReader(responseEntity.getBody().getInputStream())
);
json = element.getAsJsonObject();
} catch (IOException e) {
throw new RuntimeException(e.getLocalizedMessage());
}
This file contains hidden or 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
| public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) | |
| throws IOException, ServletException { | |
| final HttpServletRequest httpRequest = (HttpServletRequest) request; | |
| final HttpServletResponse httpResponse = (HttpServletResponse) response; | |
| final String path = ((HttpServletRequest) request).getRequestURI(); | |
| if (path.startsWith("/api/v1/oauth")) { | |
| chain.doFilter(request, response); | |
| } else { | |
| chain.doFilter(request, response); | |
| } |
$ git commit -m "Something terribly misguided" (1)
$ git reset HEAD~ (2)
<< edit files as necessary >> (3)
$ git add ... (4)
$ git commit -c ORIG_HEAD (5)
- This is what you want to undo
Errors you'll see if a RestTemplate isn't defined
Consider defining a bean of type 'org.springframework.web.client.RestTemplate' in your configuration.
or
No qualifying bean of type
This file contains hidden or 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
Show hidden characters
| { | |
| "presets": ["es2015"], | |
| "plugins": ["transform-runtime"] | |
| } |
This file contains hidden or 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
| version: '2' | |
| networks: | |
| xyd-themis: | |
| services: | |
| rca-themis: | |
| container_name: rca-themis | |
| image: hyperledger/fabric-ca:x86_64-1.1.0 |
This file contains hidden or 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
| version: '2' | |
| networks: | |
| xyd-themis: | |
| services: | |
| rca-themis: | |
| container_name: rca-themis | |
| image: hyperledger/fabric-ca:x86_64-1.1.0 |
This file contains hidden or 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
| --- | |
| name: "xyd-themis" | |
| x-type: "hlfv1" | |
| description: "Themis Network" | |
| version: "1.0" | |
| client: | |
| organization: xiaoyudian | |
| logging: |
This file contains hidden or 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 chainmgmt | |
| import ( | |
| "net/http" | |
| "github.com/gin-gonic/gin" | |
| "github.com/hyperledger/fabric-sdk-go/pkg/client/msp" | |
| "github.com/hyperledger/fabric-sdk-go/pkg/client/resmgmt" | |
| "github.com/hyperledger/fabric-sdk-go/pkg/fab/ccpackager/gopackager" | |
| "github.com/hyperledger/fabric-sdk-go/pkg/fabsdk" |
OlderNewer