??xml version="1.0" encoding="utf-8" standalone="yes"?>美国职业棒球比分牌kpc:BlogJava - 棒球比分大小怎么算|վ//www.355548.live/paulwong/zh-cnMon, 26 Oct 2020 06:57:12 GMTMon, 26 Oct 2020 06:57:12 GMT60!!!服务器端各种安装 - 棒球比分大小怎么算|վ//www.355548.live/paulwong/archive/2020/10/24/435705.htmlpaulwongpaulwongSat, 24 Oct 2020 15:46:00 GMT//www.355548.live/paulwong/archive/2020/10/24/435705.html//www.355548.live/paulwong/comments/435705.html//www.355548.live/paulwong/archive/2020/10/24/435705.html#Feedback0//www.355548.live/paulwong/comments/commentRss/435705.html//www.355548.live/paulwong/services/trackbacks/435705.htmlhttps://www.server-world.info/en/



paulwong 2020-10-24 23:46 发表评论
]]>
install redhat rh-mariadb103 - 棒球比分大小怎么算|վ//www.355548.live/paulwong/archive/2020/10/24/435704.htmlpaulwongpaulwongSat, 24 Oct 2020 10:02:00 GMT//www.355548.live/paulwong/archive/2020/10/24/435704.html//www.355548.live/paulwong/comments/435704.html//www.355548.live/paulwong/archive/2020/10/24/435704.html#Feedback0//www.355548.live/paulwong/comments/commentRss/435704.html//www.355548.live/paulwong/services/trackbacks/435704.html# Install MariaDB 10.3
yum install rh-mariadb103-mariadb-server rh-mariadb103-mariadb-server-utils -y

# Add MariaDB 10.3 to $PATH
scl enable rh-mariadb103 bash
source /opt/rh/rh-mariadb103/enable

# start 10.3 server
chown -R mysql:mysql /var/opt/rh/rh-mariadb103/lib/mysql;
systemctl start rh-mariadb103-mariadb

# Upgrade tables
mysql_upgrade -p[PASSWORD]

# Set 10.3 to start on boot
systemctl enable rh-mariadb103-mariadb

# Add 10.3 to paths on reboot (and remove 10.2) 
rm /etc/profile.d/rh-mariadb102.sh
cp /opt/rh/rh-mariadb103/enable /etc/profile.d/rh-mariadb103.sh

# increase max connections number
systemctl edit rh-mariadb103-mariadb
[Service]
LimitNOFILE=65535
LimitNPROC=65535

vi /etc/opt/rh/rh-mariadb103/my.cnf
[mysqld]
max_connections=1000
open_files_limit=65535

# restart mariadb103
systemctl daemon-reload
systemctl restart rh-mariadb103-mariadb

# check result
mysql -e 'show variables like "max_connections"'

https://www.server-world.info/en/note?os=CentOS_7&p=mariadb103&f=4


paulwong 2020-10-24 18:02 发表评论
]]>
SPRING 中YAML文g密码不以明文保存 - 棒球比分大小怎么算|վ//www.355548.live/paulwong/archive/2020/10/20/435697.htmlpaulwongpaulwongTue, 20 Oct 2020 06:59:00 GMT//www.355548.live/paulwong/archive/2020/10/20/435697.html//www.355548.live/paulwong/comments/435697.html//www.355548.live/paulwong/archive/2020/10/20/435697.html#Feedback0//www.355548.live/paulwong/comments/commentRss/435697.html//www.355548.live/paulwong/services/trackbacks/435697.htmlUpdate: for production environment, to avoid exposing the password in the command line, since you can query the processes with ps, previous commands with history, etc etc. You could:

  • Create a script like this: touch setEnv.sh
  • Edit setEnv.sh to export the JASYPT_ENCRYPTOR_PASSWORD variable

    #!/bin/bash

    export JASYPT_ENCRYPTOR_PASSWORD=supersecretz

  • Execute the file with . setEnv.sh
  • Run the app in background with mvn spring-boot:run &
  • Delete the file setEnv.sh
  • Unset the previous environment variable with: unset JASYPT_ENCRYPTOR_PASSWORD

https://stackoverflow.com/questions/37404703/spring-boot-how-to-hide-passwords-in-properties-file



paulwong 2020-10-20 14:59 发表评论
]]>
SPRING INTEGRATION HEADER问题 - 棒球比分大小怎么算|վ//www.355548.live/paulwong/archive/2020/10/20/435696.htmlpaulwongpaulwongTue, 20 Oct 2020 06:56:00 GMT//www.355548.live/paulwong/archive/2020/10/20/435696.html//www.355548.live/paulwong/comments/435696.html//www.355548.live/paulwong/archive/2020/10/20/435696.html#Feedback0//www.355548.live/paulwong/comments/commentRss/435696.html//www.355548.live/paulwong/services/trackbacks/435696.html
.headerFilter("Api-Key", "Content-Type", "X-Powered-By", "Content-Language", "Transfer-Encoding", "Cache-Control", "Keep-Alive", "Set-Cookie")

https://stackoverflow.com/questions/50608415/cwsia0112e-the-property-name-keep-alive-is-not-a-valid-java-identifier

paulwong 2020-10-20 14:56 发表评论
]]>
RestTemplate处理h状态码为非200的返回数?/title><link>//www.355548.live/paulwong/archive/2020/10/16/435694.html</link><dc:creator>paulwong</dc:creator><author>paulwong</author><pubDate>Fri, 16 Oct 2020 08:54:00 GMT</pubDate><guid>//www.355548.live/paulwong/archive/2020/10/16/435694.html</guid><wfw:comment>//www.355548.live/paulwong/comments/435694.html</wfw:comment><comments>//www.355548.live/paulwong/archive/2020/10/16/435694.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>//www.355548.live/paulwong/comments/commentRss/435694.html</wfw:commentRss><trackback:ping>//www.355548.live/paulwong/services/trackbacks/435694.html</trackback:ping><description><![CDATA[RestTemplate是Spring提供的用于访问Rest服务的客LQ?br /><br />RestTemplate提供了多U便捯问远EHttp服务的方?能够大大提高客户端的~写效率?br /><br />调用RestTemplate的默认构造函敎ͼRestTemplate对象在底层通过使用java.net包下的实现创建HTTP hQ?br /><br />可以通过使用ClientHttpRequestFactory指定不同的HTTPh方式?br /><br />ClientHttpRequestFactory接口主要提供了两U实现方?br /><br />1、一U是SimpleClientHttpRequestFactoryQ用J2SE提供的方式(既java.net包提供的方式Q创建底层的Httphq接?br /><br />2、一U方式是使用HttpComponentsClientHttpRequestFactory方式Q底层用HttpClient讉Kq程的Http服务Q用HttpClient可以配置q接池和证书{信息?br /><br />默认?RestTemplate 有个机制是请求状态码?00 抛出异常,会中断接下来的操作。如果不想中断对l果数据得解析,可以通过覆盖默认?ResponseErrorHandler Q见下面的示例,CZ中的Ҏ中基本都是空ҎQ只要对hasError修改下,让他一直返回trueQ即是不查状态码及抛异常了?br /><br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />//www.CodeHighlighter.com/<br /><br />--><span style="color: #0000FF; ">package</span> com.example.demo.web.config;<br /><br /><span style="color: #0000FF; ">import</span> java.io.IOException;<br /><br /><span style="color: #0000FF; ">import</span> org.springframework.context.annotation.Bean;<br /><span style="color: #0000FF; ">import</span> org.springframework.context.annotation.Configuration;<br /><span style="color: #0000FF; ">import</span> org.springframework.http.client.ClientHttpRequestFactory;<br /><span style="color: #0000FF; ">import</span> org.springframework.http.client.ClientHttpResponse;<br /><span style="color: #0000FF; ">import</span> org.springframework.http.client.SimpleClientHttpRequestFactory;<br /><span style="color: #0000FF; ">import</span> org.springframework.web.client.ResponseErrorHandler;<br /><span style="color: #0000FF; ">import</span> org.springframework.web.client.RestTemplate;<br /><br />@Configuration<br /><span style="color: #0000FF; ">public</span> <span style="color: #0000FF; ">class</span> RestTemplateConfig {<br />    <br />    @Bean<br />    <span style="color: #0000FF; ">public</span> RestTemplate restTemplate(ClientHttpRequestFactory factory) <span style="color: #0000FF; ">throws</span> Exception {<br />        RestTemplate restTemplate = <span style="color: #0000FF; ">new</span> RestTemplate(factory);<br />        ResponseErrorHandler responseErrorHandler = <span style="color: #0000FF; ">new</span> ResponseErrorHandler() {<br />            @Override<br />            <span style="color: #0000FF; ">public</span> <span style="color: #0000FF; ">boolean</span> hasError(ClientHttpResponse clientHttpResponse) <span style="color: #0000FF; ">throws</span> IOException {<br />                <span style="color: #0000FF; ">return</span> <span style="color: #0000FF; ">true</span>;<br />            }<br />            @Override<br />            <span style="color: #0000FF; ">public</span> <span style="color: #0000FF; ">void</span> handleError(ClientHttpResponse clientHttpResponse) <span style="color: #0000FF; ">throws</span> IOException {<br />            }<br />        };<br />        restTemplate.setErrorHandler(responseErrorHandler);<br />        <span style="color: #0000FF; ">return</span> restTemplate;<br />    }<br />    <br />    @Bean<br />    <span style="color: #0000FF; ">public</span> ClientHttpRequestFactory simpleClientHttpRequestFactory(){<br />        SimpleClientHttpRequestFactory factory = <span style="color: #0000FF; ">new</span> SimpleClientHttpRequestFactory();<br />        <span style="color: #008000; ">//</span><span style="color: #008000; ">d时5U?/span><span style="color: #008000; "><br /></span>        factory.setReadTimeout(5000);<br />        <span style="color: #008000; ">//</span><span style="color: #008000; ">q接时15U?/span><span style="color: #008000; "><br /></span>        factory.setConnectTimeout(15000);<br />        <span style="color: #0000FF; ">return</span> factory;<br />    }<br />}</div><br />RestTemppateq用实例<br /><br /><div style="background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%; word-break: break-all;"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />//www.CodeHighlighter.com/<br /><br />--><span style="color: #0000FF; ">package</span> com.example.demo.web.controller;<br /><br /><span style="color: #0000FF; ">import</span> org.slf4j.Logger;<br /><span style="color: #0000FF; ">import</span> org.slf4j.LoggerFactory;<br /><span style="color: #0000FF; ">import</span> org.springframework.beans.factory.annotation.Autowired;<br /><span style="color: #0000FF; ">import</span> org.springframework.http.ResponseEntity;<br /><span style="color: #0000FF; ">import</span> org.springframework.web.bind.annotation.GetMapping;<br /><span style="color: #0000FF; ">import</span> org.springframework.web.bind.annotation.RestController;<br /><span style="color: #0000FF; ">import</span> org.springframework.web.client.RestTemplate;<br /><br /><span style="color: #0000FF; ">import</span> com.example.demo.domain.Book;<br /><br />@RestController<br /><span style="color: #0000FF; ">public</span> <span style="color: #0000FF; ">class</span> TestBookController {<br />    <span style="color: #0000FF; ">private</span> Logger logger = LoggerFactory.getLogger(getClass());<br />    <br />      @Autowired<br />      <span style="color: #0000FF; ">private</span> RestTemplate restTemplate;<br />      <br />      @GetMapping("/testaddbook")<br />      <span style="color: #0000FF; ">public</span> Book testAddBook() {<br />              Book book = <span style="color: #0000FF; ">new</span> Book();<br />              ResponseEntity<Book> responseEntity = restTemplate.postForEntity( "//localhost:8061/book", book , Book.<span style="color: #0000FF; ">class</span>);<br />              <span style="color: #0000FF; ">return</span> responseEntity.getBody();<br />      }<br /><br />}</div><br />其他ҎQcatch <span style="font-size: 13px; background-color: #eeeeee;">HttpStatusCodeException </span>, <span style="color: #008000; font-size: 13px; background-color: #eeeeee;">e.getResponseBodyAsString()</span><br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />//www.CodeHighlighter.com/<br /><br />--><span style="color: #0000FF; ">try</span> {<br />    ResponseEntity<Component> response = restTemplate.exchange(webSvcURL,<br />        HttpMethod.POST, <br />        requestEntity,<br />        Component.<span style="color: #0000FF; ">class</span>);<br />} <span style="color: #0000FF; ">catch</span> (HttpStatusCodeException e) {<br />    List<String> customHeader = e.getResponseHeaders().get("x-app-err-id");<br />    String svcErrorMessageID = "";<br />    <span style="color: #0000FF; ">if</span> (customHeader != <span style="color: #0000FF; ">null</span>) {<br />        svcErrorMessageID = customHeader.get(0);                <br />    }<br />    <span style="color: #0000FF; ">throw</span> <span style="color: #0000FF; ">new</span> CustomException(e.getMessage(), e, svcErrorMessageID);<br />    <span style="color: #008000; ">//</span><span style="color: #008000; "> You can get the body too but you will have to deserialize it yourself<br />    </span><span style="color: #008000; ">//</span><span style="color: #008000; "> e.getResponseBodyAsByteArray()<br />    </span><span style="color: #008000; ">//</span><span style="color: #008000; "> e.getResponseBodyAsString()</span><span style="color: #008000; "><br /></span>}</div><br /><a target="_blank">https://stackoverflow.com/questions/7878002/resttemplate-handling-response-headers-body-in-exceptions-restclientexception</a><br /><br /><a target="_blank">https://stackoverflow.com/questions/38093388/spring-resttemplate-exception-handling/51805956#51805956</a><img src ="//www.355548.live/paulwong/aggbug/435694.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="//www.355548.live/paulwong/" target="_blank">paulwong</a> 2020-10-16 16:54 <a href="//www.355548.live/paulwong/archive/2020/10/16/435694.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Error handling in spring integration - How to get all the errors thrown in multiple threads and send them to the error-channel - 棒球比分大小怎么算|վ//www.355548.live/paulwong/archive/2020/10/15/435693.htmlpaulwongpaulwongThu, 15 Oct 2020 11:21:00 GMT//www.355548.live/paulwong/archive/2020/10/15/435693.html//www.355548.live/paulwong/comments/435693.html//www.355548.live/paulwong/archive/2020/10/15/435693.html#Feedback0//www.355548.live/paulwong/comments/commentRss/435693.html//www.355548.live/paulwong/services/trackbacks/435693.html
@Bean
public IntegrationFlow provisionUserFlow() {
return
    IntegrationFlows.from("input.channel")
    .publishSubscribeChannel(Executors.newCachedThreadPool(),
        s -> s.applySequence(true)
            .subscribe(f -> f.enrichHeaders(e -> e.header(MessageHeaders.ERROR_CHANNEL, "errorChannel", true))
                .handle(provisionerA, "provision")
                .channel("aggregatorChannel")
            )
            .subscribe(f -> f.enrichHeaders(e -> e.header(MessageHeaders.ERROR_CHANNEL, "errorChannel", true))
                .handle(provisionerB, "provision")
                .channel("aggregatorChannel"))
            )
        .get();
}

@Bean
public IntegrationFlow aggregateFlow() {
    return IntegrationFlows.from("aggregatorChannel")
                    .channel( aggregatorChannel)
                    .aggregate( a -> a.processor( collect, "aggregatingMethod"))
                    .get();
}

@Transformer( inputChannel = "errorChannel", outputChannel = "aggregatorChannel")
public Message<?> errorChannelHandler(ErrorMessage errorMessage) throws RuntimeException {

    Message<?> failedMessage =  ((MessagingException) errorMessage.getPayload()).getFailedMessage();

    Exception exception = (Exception) errorMessage.getPayload();

    return  MessageBuilder.withPayload( exception.getMessage())
                                       .copyHeadersIfAbsent( failedMessage.getHeaders() )
                                       .build();
}


https://stackoverflow.com/q/46495127/11790720



paulwong 2020-10-15 19:21 发表评论
]]>
SPRING INTEGRATION子FLOW - 棒球比分大小怎么算|վ//www.355548.live/paulwong/archive/2020/10/15/435692.htmlpaulwongpaulwongThu, 15 Oct 2020 03:29:00 GMT//www.355548.live/paulwong/archive/2020/10/15/435692.html//www.355548.live/paulwong/comments/435692.html//www.355548.live/paulwong/archive/2020/10/15/435692.html#Feedback0//www.355548.live/paulwong/comments/commentRss/435692.html//www.355548.live/paulwong/services/trackbacks/435692.html split之后Q可以将message分给不同的子flow处理Q配|如下:
@Bean
public IntegrationFlow parallelSplitRouteAggregateFlow() {
    return IntegrationFlows
            .from(Http.inboundGateway("/trigger"))
            .handle((p, h) -> Arrays.asList(1, 2, 3))
            .split()
            .channel(MessageChannels.executor(Executors.newCachedThreadPool()))
            .<Integer, Boolean>route(o -> o % 2 == 0, m -> m
                    .subFlowMapping(true, sf -> sf.gateway(oddFlow()))
                    .subFlowMapping(false, sf -> sf.gateway(evenFlow())))
            .aggregate()
            .get();
}

@Bean
public IntegrationFlow oddFlow() {
    return flow -> flow.<Integer>handle((payload, headers) -> "odd");
}

@Bean
public IntegrationFlow evenFlow() {
    return flow -> flow.<Integer>handle((payload, headers) -> "even");
}


https://stackoverflow.com/questions/50121384/spring-integration-parallel-split-route-aggregate-flow-fails-due-to-one-way-mess

paulwong 2020-10-15 11:29 发表评论
]]>
在LINUX中格式化JSON的工?jq - 棒球比分大小怎么算|վ//www.355548.live/paulwong/archive/2020/10/12/435689.htmlpaulwongpaulwongMon, 12 Oct 2020 01:55:00 GMT//www.355548.live/paulwong/archive/2020/10/12/435689.html//www.355548.live/paulwong/comments/435689.html//www.355548.live/paulwong/archive/2020/10/12/435689.html#Feedback0//www.355548.live/paulwong/comments/commentRss/435689.html//www.355548.live/paulwong/services/trackbacks/435689.html
wget -O jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
chmod +x ./jq
cp jq /usr/bin


paulwong 2020-10-12 09:55 发表评论
]]>
怀旧框枉?/title><link>//www.355548.live/paulwong/archive/2020/10/09/435687.html</link><dc:creator>paulwong</dc:creator><author>paulwong</author><pubDate>Fri, 09 Oct 2020 11:14:00 GMT</pubDate><guid>//www.355548.live/paulwong/archive/2020/10/09/435687.html</guid><wfw:comment>//www.355548.live/paulwong/comments/435687.html</wfw:comment><comments>//www.355548.live/paulwong/archive/2020/10/09/435687.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>//www.355548.live/paulwong/comments/commentRss/435687.html</wfw:commentRss><trackback:ping>//www.355548.live/paulwong/services/trackbacks/435687.html</trackback:ping><description><![CDATA[     摘要: 最q在公司用JUP框架做项?发现q个框架是别人基于SpringSide装?所以打学习下,SpringSide,其中遇到了很多坑,做个记录,|上关于q方面的资料都有些老了,而且SpringSide最新的版本是SpringSide-Utils,老一点的版本为v4.2.2.GA,以下分别对这两个版本分别介绍?主要内容来自于网上。一些资?Github源码地址:  https://gi...  <a href='//www.355548.live/paulwong/archive/2020/10/09/435687.html'>阅读全文</a><img src ="//www.355548.live/paulwong/aggbug/435687.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="//www.355548.live/paulwong/" target="_blank">paulwong</a> 2020-10-09 19:14 <a href="//www.355548.live/paulwong/archive/2020/10/09/435687.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>U上JVM工具 - 棒球比分大小怎么算|վ//www.355548.live/paulwong/archive/2020/10/09/435686.htmlpaulwongpaulwongFri, 09 Oct 2020 11:12:00 GMT//www.355548.live/paulwong/archive/2020/10/09/435686.html//www.355548.live/paulwong/comments/435686.html//www.355548.live/paulwong/archive/2020/10/09/435686.html#Feedback0//www.355548.live/paulwong/comments/commentRss/435686.html//www.355548.live/paulwong/services/trackbacks/435686.htmlhttps://github.com/vipshop/vjtools

]]>
{ganrao}