├── .gitignore ├── README.md ├── lib └── temp │ ├── META-INF │ └── MANIFEST.MF │ ├── com │ └── lsj │ │ ├── http │ │ ├── AbstractHttpParams.class │ │ ├── HttpGetParams.class │ │ ├── HttpMimeParams.class │ │ ├── HttpParams.class │ │ └── HttpPostParams.class │ │ └── trans │ │ ├── AbstractOnlineTranslator.class │ │ ├── LANG.class │ │ ├── Translator.class │ │ ├── annotation │ │ └── TranslatorComponent.class │ │ ├── exception │ │ └── DupIdException.class │ │ ├── factory │ │ ├── AbstractTranslatorFactory.class │ │ ├── TFactory.class │ │ └── TranslatorFactory.class │ │ └── impl │ │ ├── BaiduTranslator.class │ │ ├── GoogleTranslator.class │ │ ├── JinshanTranslator.class │ │ ├── TencentTranslator.class │ │ └── YoudaoTranslator.class │ └── util_trans.jar ├── officlialblog ├── manifest.yml ├── pom.xml ├── readme.md ├── restart.sh ├── src │ ├── main │ │ ├── java │ │ │ └── com │ │ │ │ └── spring4all │ │ │ │ ├── App.java │ │ │ │ ├── controller │ │ │ │ └── TranslateController.java │ │ │ │ ├── enums │ │ │ │ ├── LanguageEnum.java │ │ │ │ └── TranslatorNameEnum.java │ │ │ │ ├── factory │ │ │ │ ├── AbstractTranslatorFactory.java │ │ │ │ └── TranslatorFactory.java │ │ │ │ ├── job │ │ │ │ └── WeeklyPaperJobs.java │ │ │ │ ├── service │ │ │ │ ├── AbstractOnlineTranslator.java │ │ │ │ ├── MailService.java │ │ │ │ ├── WeeklyPostService.java │ │ │ │ ├── impl │ │ │ │ │ ├── BaiDuTranslator.java │ │ │ │ │ ├── GoogleTranslator.java │ │ │ │ │ ├── MailServiceImpl.java │ │ │ │ │ └── WeeklyPostServiceImpl.java │ │ │ │ └── translate │ │ │ │ │ └── http │ │ │ │ │ ├── AbstractHttpParams.java │ │ │ │ │ ├── HttpGetParams.java │ │ │ │ │ ├── HttpMimeParams.java │ │ │ │ │ ├── HttpParams.java │ │ │ │ │ └── HttpPostParams.java │ │ │ │ └── util │ │ │ │ ├── JsoupUtil.java │ │ │ │ ├── MyArrayList.java │ │ │ │ ├── QrCodeUtil.java │ │ │ │ └── UploadImageUtil.java │ │ └── resources │ │ │ ├── META-INF │ │ │ └── MANIFEST.MF │ │ │ ├── application-dev.yml │ │ │ ├── application-prod.yml │ │ │ ├── application.yml │ │ │ └── static │ │ │ └── qr-code.png │ └── test │ │ └── java │ │ ├── MailTest.java │ │ └── QRImageGenerateTest.java └── translated │ └── 20171010.md └── translated ├── 20170829.md ├── 20170905.md ├── 20170912.md ├── 20170919.md ├── 20170926.md ├── 20171003.md ├── 20171010.md ├── 20171017.md ├── 20171024.md ├── 20171108.md ├── 20171122.md └── 20171128.md /.gitignore: -------------------------------------------------------------------------------- 1 | officlialblog/ipse 2 | officlialblog/.classpath 3 | officlialblog/.project 4 | officlialblog/.settings/ 5 | 6 | # Intellij 7 | officlialblog/.idea/ 8 | officlialblog/*.iml 9 | officlialblog/*.iws 10 | 11 | # Mac 12 | officlialblog/.DS_Store 13 | 14 | # Maven 15 | 16 | officlialblog/target 17 | # Other 18 | officlialblog/out 19 | officlialblog/*.iml 20 | officlialblog/*.log 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ThisWeekInSpringTranslate 2 | -------------------------------------------------------------------------------- /lib/temp/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: lib/commons-codec-1.9.jar lib/commons-logging-1.2.jar lib/ 3 | fluent-hc-4.5.2.jar lib/httpclient-4.5.2.jar lib/httpclient-cache-4.5 4 | .2.jar lib/httpclient-win-4.5.2.jar lib/httpmime-4.5.2.jar lib/jna-4. 5 | 1.0.jar lib/jna-platform-4.1.0.jar lib/httpcore-4.4.4.jar lib/commons 6 | -fileupload-1.3.2.jar lib/servlet-api.jar lib/commons-io-2.5.jar 7 | Main-Class: com.lsj.tad.server.App 8 | 9 | -------------------------------------------------------------------------------- /lib/temp/com/lsj/http/AbstractHttpParams.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpringForAll/ThisWeekInSpringTranslate/ca6212973f122c5c5e09ed4f29c49458b986c22f/lib/temp/com/lsj/http/AbstractHttpParams.class -------------------------------------------------------------------------------- /lib/temp/com/lsj/http/HttpGetParams.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpringForAll/ThisWeekInSpringTranslate/ca6212973f122c5c5e09ed4f29c49458b986c22f/lib/temp/com/lsj/http/HttpGetParams.class -------------------------------------------------------------------------------- /lib/temp/com/lsj/http/HttpMimeParams.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpringForAll/ThisWeekInSpringTranslate/ca6212973f122c5c5e09ed4f29c49458b986c22f/lib/temp/com/lsj/http/HttpMimeParams.class -------------------------------------------------------------------------------- /lib/temp/com/lsj/http/HttpParams.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpringForAll/ThisWeekInSpringTranslate/ca6212973f122c5c5e09ed4f29c49458b986c22f/lib/temp/com/lsj/http/HttpParams.class -------------------------------------------------------------------------------- /lib/temp/com/lsj/http/HttpPostParams.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpringForAll/ThisWeekInSpringTranslate/ca6212973f122c5c5e09ed4f29c49458b986c22f/lib/temp/com/lsj/http/HttpPostParams.class -------------------------------------------------------------------------------- /lib/temp/com/lsj/trans/AbstractOnlineTranslator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpringForAll/ThisWeekInSpringTranslate/ca6212973f122c5c5e09ed4f29c49458b986c22f/lib/temp/com/lsj/trans/AbstractOnlineTranslator.class -------------------------------------------------------------------------------- /lib/temp/com/lsj/trans/LANG.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpringForAll/ThisWeekInSpringTranslate/ca6212973f122c5c5e09ed4f29c49458b986c22f/lib/temp/com/lsj/trans/LANG.class -------------------------------------------------------------------------------- /lib/temp/com/lsj/trans/Translator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpringForAll/ThisWeekInSpringTranslate/ca6212973f122c5c5e09ed4f29c49458b986c22f/lib/temp/com/lsj/trans/Translator.class -------------------------------------------------------------------------------- /lib/temp/com/lsj/trans/annotation/TranslatorComponent.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpringForAll/ThisWeekInSpringTranslate/ca6212973f122c5c5e09ed4f29c49458b986c22f/lib/temp/com/lsj/trans/annotation/TranslatorComponent.class -------------------------------------------------------------------------------- /lib/temp/com/lsj/trans/exception/DupIdException.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpringForAll/ThisWeekInSpringTranslate/ca6212973f122c5c5e09ed4f29c49458b986c22f/lib/temp/com/lsj/trans/exception/DupIdException.class -------------------------------------------------------------------------------- /lib/temp/com/lsj/trans/factory/AbstractTranslatorFactory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpringForAll/ThisWeekInSpringTranslate/ca6212973f122c5c5e09ed4f29c49458b986c22f/lib/temp/com/lsj/trans/factory/AbstractTranslatorFactory.class -------------------------------------------------------------------------------- /lib/temp/com/lsj/trans/factory/TFactory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpringForAll/ThisWeekInSpringTranslate/ca6212973f122c5c5e09ed4f29c49458b986c22f/lib/temp/com/lsj/trans/factory/TFactory.class -------------------------------------------------------------------------------- /lib/temp/com/lsj/trans/factory/TranslatorFactory.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpringForAll/ThisWeekInSpringTranslate/ca6212973f122c5c5e09ed4f29c49458b986c22f/lib/temp/com/lsj/trans/factory/TranslatorFactory.class -------------------------------------------------------------------------------- /lib/temp/com/lsj/trans/impl/BaiduTranslator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpringForAll/ThisWeekInSpringTranslate/ca6212973f122c5c5e09ed4f29c49458b986c22f/lib/temp/com/lsj/trans/impl/BaiduTranslator.class -------------------------------------------------------------------------------- /lib/temp/com/lsj/trans/impl/GoogleTranslator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpringForAll/ThisWeekInSpringTranslate/ca6212973f122c5c5e09ed4f29c49458b986c22f/lib/temp/com/lsj/trans/impl/GoogleTranslator.class -------------------------------------------------------------------------------- /lib/temp/com/lsj/trans/impl/JinshanTranslator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpringForAll/ThisWeekInSpringTranslate/ca6212973f122c5c5e09ed4f29c49458b986c22f/lib/temp/com/lsj/trans/impl/JinshanTranslator.class -------------------------------------------------------------------------------- /lib/temp/com/lsj/trans/impl/TencentTranslator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpringForAll/ThisWeekInSpringTranslate/ca6212973f122c5c5e09ed4f29c49458b986c22f/lib/temp/com/lsj/trans/impl/TencentTranslator.class -------------------------------------------------------------------------------- /lib/temp/com/lsj/trans/impl/YoudaoTranslator.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpringForAll/ThisWeekInSpringTranslate/ca6212973f122c5c5e09ed4f29c49458b986c22f/lib/temp/com/lsj/trans/impl/YoudaoTranslator.class -------------------------------------------------------------------------------- /lib/temp/util_trans.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpringForAll/ThisWeekInSpringTranslate/ca6212973f122c5c5e09ed4f29c49458b986c22f/lib/temp/util_trans.jar -------------------------------------------------------------------------------- /officlialblog/manifest.yml: -------------------------------------------------------------------------------- 1 | pplications: 2 | 3 | - name: translate_this_spring_week 4 | 5 | instances: 1 6 | 7 | host: ttsw 8 | 9 | path: target/officialblog-1.0-SNAPSHOT.jar 10 | -------------------------------------------------------------------------------- /officlialblog/pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 4.0.0 6 | 7 | com.spring4all 8 | officialblog 9 | 1.0-SNAPSHOT 10 | 11 | 12 | UTF-8 13 | 14 | 15 | org.springframework.boot 16 | spring-boot-starter-parent 17 | 1.5.3.RELEASE 18 | 19 | 20 | 21 | 22 | 23 | org.springframework.boot 24 | spring-boot-starter 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | org.springframework.boot 37 | spring-boot-starter-test 38 | test 39 | 40 | 41 | 42 | 43 | org.springframework.boot 44 | spring-boot-starter-web 45 | 46 | 47 | 48 | 49 | org.springframework.boot 50 | spring-boot-devtools 51 | true 52 | 53 | 54 | 55 | com.qiniu 56 | qiniu-java-sdk 57 | 7.0.0 58 | 59 | 60 | 61 | 62 | org.jsoup 63 | jsoup 64 | 1.10.2 65 | 66 | 67 | 74 | 75 | 76 | com.alibaba 77 | fastjson 78 | 1.2.14 79 | 80 | 81 | org.apache.httpcomponents 82 | httpclient 83 | 84 | 85 | org.apache.httpcomponents 86 | httpmime 87 | 88 | 89 | 90 | org.springframework.boot 91 | spring-boot-starter-mail 92 | 93 | 94 | junit 95 | junit 96 | 97 | 98 | 99 | 100 | net.glxn.qrgen 101 | javase 102 | 2.0 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | org.apache.maven.plugins 118 | maven-compiler-plugin 119 | 120 | 1.8 121 | 1.8 122 | 123 | 124 | 125 | org.apache.maven.plugins 126 | maven-shade-plugin 127 | 2.4.1 128 | 129 | 130 | package 131 | 132 | shade 133 | 134 | 135 | 136 | 137 | com.spring4all.App 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | org.springframework.boot 146 | spring-boot-maven-plugin 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | -------------------------------------------------------------------------------- /officlialblog/readme.md: -------------------------------------------------------------------------------- 1 | 1. 增加定时任务; 2 | 2. 增加发送springio周报到邮箱 3 | 4 | 如果需要添加收件人,只要在 5 | 6 | ``` 7 | application.yml : 8 | 9 | email.receiver后面加上收件人就可以了,注意用逗号隔开,前后不要留逗号. 10 | ``` 11 | 12 | 访问接口: 13 | 14 | * 如果不需要邮件,直接访问: `curl -XGET http://localhost:8080/translate` 15 | * 如果需要发送邮件(邮件提前配置),访问接口: `curl -XGET http://localhost:8080/mail` 16 | -------------------------------------------------------------------------------- /officlialblog/restart.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | source /etc/profile 3 | #pname=$1 4 | pname=officialblog-1.0-SNAPSHOT.jar 5 | puser=root 6 | 7 | 8 | pid=`ps aux | grep $pname | grep $puser | grep -v grep | awk '{print $2}'` 9 | 10 | if [[ -z $pid ]]; then 11 | echo "I can NOT find $pname running by $puser" 12 | fi 13 | 14 | chmod 777 /home/blog/officialblog-1.0-SNAPSHOT.jar 15 | kill -9 $pid >/dev/null 2>&1 16 | cd /home/blog/ 17 | exec nohup java -jar $pname --cacheType=single --spring.profiles.active=prod 5 >>server.log & 18 | tail -f server.log 19 | -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/App.java: -------------------------------------------------------------------------------- 1 | package com.spring4all; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | import org.springframework.boot.builder.SpringApplicationBuilder; 6 | import org.springframework.scheduling.annotation.EnableScheduling; 7 | 8 | import java.util.HashMap; 9 | 10 | /** 11 | * 启动类 12 | * 13 | * @author maskwang 14 | * 2017年6月23日 15 | */ 16 | @SpringBootApplication 17 | @EnableScheduling 18 | public class App { 19 | 20 | 21 | public static void main(String[] args) { 22 | SpringApplication.run(App.class, args); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/controller/TranslateController.java: -------------------------------------------------------------------------------- 1 | package com.spring4all.controller; 2 | 3 | import com.spring4all.service.MailService; 4 | import com.spring4all.service.WeeklyPostService; 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.web.bind.annotation.GetMapping; 9 | import org.springframework.web.bind.annotation.RestController; 10 | 11 | import java.time.LocalDate; 12 | import java.util.concurrent.ExecutorService; 13 | import java.util.concurrent.Executors; 14 | 15 | 16 | /** 17 | * Created by maskwang on 2017/9/14 0014. 18 | */ 19 | @RestController 20 | public class TranslateController { 21 | private static final Logger LOGGER = LoggerFactory.getLogger(TranslateController.class); 22 | 23 | private static ExecutorService executorService = Executors.newFixedThreadPool(1); 24 | 25 | @Autowired 26 | private WeeklyPostService weeklyPostService; 27 | 28 | @Autowired 29 | private MailService mailService; 30 | 31 | 32 | @GetMapping(value = "/translate") 33 | public String translate(){ 34 | long time = System.currentTimeMillis(); 35 | LOGGER.info("开始获取周报内容,开始时间{}", time); 36 | String weeklyPost = weeklyPostService.crawlWeeklyPost(); 37 | LOGGER.info("结束,花费时间:{}", System.currentTimeMillis() - time); 38 | return weeklyPost; 39 | } 40 | @GetMapping(value = "/mail") 41 | public String translateAndSendMail() { 42 | 43 | long time = System.currentTimeMillis(); 44 | LOGGER.info("开始获取周报内容,开始时间{}", time); 45 | String weeklyPost = weeklyPostService.crawlWeeklyPost(); 46 | LOGGER.info("结束,花费时间:{}", System.currentTimeMillis() - time); 47 | 48 | LocalDate localDate = LocalDate.now(); 49 | LOGGER.info("开始发送邮件:{}", System.currentTimeMillis()); 50 | executorService.submit( 51 | () -> mailService.sendTextAndFile(localDate.toString(), weeklyPost, localDate + ".md", weeklyPost) 52 | ); 53 | LOGGER.info("结束,花费时间:{}", System.currentTimeMillis() - time); 54 | return weeklyPost; 55 | } 56 | 57 | } 58 | 59 | -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/enums/LanguageEnum.java: -------------------------------------------------------------------------------- 1 | package com.spring4all.enums; 2 | 3 | public enum LanguageEnum { 4 | EN, //英文 5 | ZH, //中文 6 | RU //俄语 7 | } 8 | -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/enums/TranslatorNameEnum.java: -------------------------------------------------------------------------------- 1 | package com.spring4all.enums; 2 | 3 | /** 4 | * @author chen 5 | * @version V1.0 6 | * @date 2017/9/30 7 | */ 8 | public enum TranslatorNameEnum { 9 | GOOGLE, BAIDU 10 | } 11 | -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/factory/AbstractTranslatorFactory.java: -------------------------------------------------------------------------------- 1 | package com.spring4all.factory; 2 | 3 | import com.spring4all.enums.TranslatorNameEnum; 4 | import com.spring4all.service.AbstractOnlineTranslator; 5 | 6 | public abstract class AbstractTranslatorFactory { 7 | /** 8 | * google/baidu 9 | * 10 | * @param translatorName 11 | * @return 12 | */ 13 | public abstract AbstractOnlineTranslator getTranslator(TranslatorNameEnum translatorName); 14 | } 15 | -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/factory/TranslatorFactory.java: -------------------------------------------------------------------------------- 1 | package com.spring4all.factory; 2 | 3 | import com.spring4all.enums.TranslatorNameEnum; 4 | import com.spring4all.service.AbstractOnlineTranslator; 5 | import com.spring4all.service.impl.BaiDuTranslator; 6 | import com.spring4all.service.impl.GoogleTranslator; 7 | 8 | /** 9 | * @author chen 10 | * @version V1.0 11 | * @date 2017/9/30 12 | */ 13 | public class TranslatorFactory extends AbstractTranslatorFactory { 14 | 15 | /** 16 | * google/baidu 17 | * 18 | * @param translatorName 19 | * @return 20 | */ 21 | @Override 22 | public AbstractOnlineTranslator getTranslator(TranslatorNameEnum translatorName) { 23 | 24 | if (null == translatorName || translatorName.equals(TranslatorNameEnum.GOOGLE)) { 25 | return GoogleTranslator.INSTANCE; 26 | } 27 | return BaiDuTranslator.INSTANCE; 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/job/WeeklyPaperJobs.java: -------------------------------------------------------------------------------- 1 | package com.spring4all.job; 2 | 3 | 4 | import com.spring4all.controller.TranslateController; 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.scheduling.annotation.Scheduled; 9 | import org.springframework.stereotype.Service; 10 | 11 | @Service 12 | public class WeeklyPaperJobs { 13 | private Logger logger = LoggerFactory.getLogger(WeeklyPaperJobs.class); 14 | 15 | @Autowired 16 | private TranslateController translateController; 17 | 18 | @Scheduled(cron = "${springio.time}") 19 | public void getSpringIoWeeklyPaper() { 20 | System.err.println("this is test"); 21 | logger.info("开始获取周报:"); 22 | try { 23 | translateController.translateAndSendMail(); 24 | } catch (Exception e) { 25 | logger.error("出现异常:{}", e); 26 | return; 27 | } 28 | 29 | logger.info("已发送至邮箱"); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/service/AbstractOnlineTranslator.java: -------------------------------------------------------------------------------- 1 | package com.spring4all.service; 2 | 3 | 4 | import com.spring4all.enums.LanguageEnum; 5 | 6 | import java.util.HashMap; 7 | import java.util.Map; 8 | 9 | /** 10 | * @author chen 11 | * @version V1.0 12 | * @date 2017/9/30 13 | */ 14 | public abstract class AbstractOnlineTranslator{ 15 | protected Map langMap = new HashMap<>(); //语言映射,由子类完成 16 | 17 | final public String trans(LanguageEnum from, LanguageEnum target, String query) throws Exception { 18 | String response = ""; 19 | try{ 20 | response = getResponse(from, target, query); 21 | String result = parseString(response); 22 | return result; 23 | }catch(Exception e){ 24 | return response; 25 | } 26 | } 27 | 28 | abstract protected String getResponse(LanguageEnum from, LanguageEnum target, String query) throws Exception ; 29 | abstract protected String parseString(String jsonString); 30 | } 31 | -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/service/MailService.java: -------------------------------------------------------------------------------- 1 | package com.spring4all.service; 2 | 3 | public interface MailService { 4 | 5 | /** 6 | * 发送文本邮件 7 | * 8 | * @param subject 邮件主题 9 | * @param text 邮件主体内容 10 | * @param receiver 11 | */ 12 | public void sendText(String subject, String text, String... receiver); 13 | 14 | /** 15 | * 发送文本和文件 16 | * @param subject 邮件主题 17 | * @param text 邮件主体内容 18 | * @param fileName 文件名 19 | * @param fileContent 文件内容 20 | * @param receiver 接收者 21 | */ 22 | public void sendTextAndFile(String subject, String text, String fileName, String fileContent, String... receiver); 23 | } 24 | -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/service/WeeklyPostService.java: -------------------------------------------------------------------------------- 1 | package com.spring4all.service; 2 | 3 | public interface WeeklyPostService { 4 | 5 | /** 6 | * 抓取每周周报 7 | * @return 8 | */ 9 | public String crawlWeeklyPost(); 10 | } 11 | -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/service/impl/BaiDuTranslator.java: -------------------------------------------------------------------------------- 1 | package com.spring4all.service.impl; 2 | 3 | 4 | import com.alibaba.fastjson.JSONArray; 5 | import com.alibaba.fastjson.JSONObject; 6 | import com.spring4all.enums.LanguageEnum; 7 | import com.spring4all.service.AbstractOnlineTranslator; 8 | import com.spring4all.service.translate.http.HttpParams; 9 | import com.spring4all.service.translate.http.HttpPostParams; 10 | 11 | /** 12 | * @author chen 13 | * @version V1.0 14 | * @date 2017/9/30 15 | */ 16 | public class BaiDuTranslator extends AbstractOnlineTranslator { 17 | 18 | public static final BaiDuTranslator INSTANCE = new BaiDuTranslator(); 19 | 20 | private BaiDuTranslator() { 21 | langMap.put(LanguageEnum.EN, "en"); 22 | langMap.put(LanguageEnum.ZH, "zh"); 23 | } 24 | 25 | @Override 26 | public String getResponse(LanguageEnum from, LanguageEnum targ, String query) throws Exception { 27 | 28 | HttpParams params = new HttpPostParams() 29 | .put("from", langMap.get(from)) 30 | .put("to", langMap.get(targ)) 31 | .put("query", query) 32 | .put("transtype", "translang") 33 | .put("simple_means_flag", "3"); 34 | 35 | return params.send2String("http://fanyi.baidu.com/v2transapi"); 36 | } 37 | 38 | @Override 39 | protected String parseString(String jsonString) { 40 | JSONObject jsonObject = JSONObject.parseObject(jsonString); 41 | JSONArray segments = jsonObject.getJSONObject("trans_result").getJSONArray("data"); 42 | StringBuilder result = new StringBuilder(); 43 | 44 | for (int i = 0; i < segments.size(); i++) { 45 | result.append(i == 0 ? "" : "\n"); 46 | result.append(segments.getJSONObject(i).getString("dst")); 47 | } 48 | return new String(result); 49 | } 50 | } 51 | 52 | -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/service/impl/GoogleTranslator.java: -------------------------------------------------------------------------------- 1 | package com.spring4all.service.impl; 2 | 3 | import com.alibaba.fastjson.JSONArray; 4 | import com.spring4all.enums.LanguageEnum; 5 | import com.spring4all.service.AbstractOnlineTranslator; 6 | import com.spring4all.service.translate.http.HttpParams; 7 | import com.spring4all.service.translate.http.HttpPostParams; 8 | 9 | import javax.script.Invocable; 10 | import javax.script.ScriptEngine; 11 | import javax.script.ScriptEngineManager; 12 | 13 | /** 14 | * @author chen 15 | * @version V1.0 16 | * @date 2017/9/30 17 | */ 18 | public final class GoogleTranslator extends AbstractOnlineTranslator { 19 | 20 | public static final GoogleTranslator INSTANCE = new GoogleTranslator(); 21 | 22 | private static ScriptEngine engine = new ScriptEngineManager().getEngineByName("JavaScript"); 23 | 24 | private GoogleTranslator() { 25 | langMap.put(LanguageEnum.EN, "en"); 26 | langMap.put(LanguageEnum.ZH, "zh-CN"); 27 | langMap.put(LanguageEnum.RU, "ru"); 28 | } 29 | 30 | @Override 31 | protected String getResponse(LanguageEnum from, LanguageEnum targ, String query) throws Exception { 32 | 33 | HttpParams params = null; 34 | params = new HttpPostParams(); //统一采用post,若字符长度小于999用get也可以的 35 | String tk = tk(query); 36 | 37 | params.put("client", "t") 38 | .put("sl", langMap.get(from)) 39 | .put("tl", langMap.get(targ)) 40 | .put("hl", "zh-CN") 41 | .put("dt", "at") 42 | .put("dt", "bd") 43 | .put("dt", "ex") 44 | .put("dt", "ld") 45 | .put("dt", "md") 46 | .put("dt", "qca") 47 | .put("dt", "rw") 48 | .put("dt", "rm") 49 | .put("dt", "ss") 50 | .put("dt", "t") 51 | 52 | .put("ie", "UTF-8") 53 | .put("oe", "UTF-8") 54 | .put("source", "btn") 55 | .put("srcrom", "1") 56 | .put("ssel", "0") 57 | .put("tsel", "0") 58 | .put("kc", "11") 59 | .put("tk", tk) 60 | .put("q", query); 61 | 62 | return params.send2String("http://translate.google.cn/translate_a/single"); 63 | } 64 | 65 | @Override 66 | protected String parseString(String jsonString) { 67 | JSONArray jsonArray = JSONArray.parseArray(jsonString); 68 | JSONArray segments = jsonArray.getJSONArray(0); 69 | StringBuilder result = new StringBuilder(); 70 | 71 | for (int i = 0; i < segments.size(); i++) { 72 | result.append(segments.getJSONArray(i).getString(0)); 73 | } 74 | 75 | return new String(result); 76 | } 77 | 78 | private String tk(String val) throws Exception { 79 | String script = "function tk(a) {" 80 | + "var TKK = ((function() {var a = 561666268;var b = 1526272306;return 406398 + '.' + (a + b); })());\n" 81 | + "function b(a, b) { for (var d = 0; d < b.length - 2; d += 3) { var c = b.charAt(d + 2), c = 'a' <= c ? c.charCodeAt(0) - 87 : Number(c), c = '+' == b.charAt(d + 1) ? a >>> c : a << c; a = '+' == b.charAt(d) ? a + c & 4294967295 : a ^ c } return a }\n" 82 | + "for (var e = TKK.split('.'), h = Number(e[0]) || 0, g = [], d = 0, f = 0; f < a.length; f++) {" 83 | + "var c = a.charCodeAt(f);" 84 | + "128 > c ? g[d++] = c : (2048 > c ? g[d++] = c >> 6 | 192 : (55296 == (c & 64512) && f + 1 < a.length && 56320 == (a.charCodeAt(f + 1) & 64512) ? (c = 65536 + ((c & 1023) << 10) + (a.charCodeAt(++f) & 1023), g[d++] = c >> 18 | 240, g[d++] = c >> 12 & 63 | 128) : g[d++] = c >> 12 | 224, g[d++] = c >> 6 & 63 | 128), g[d++] = c & 63 | 128)" 85 | + "}" 86 | + "a = h;" 87 | + "for (d = 0; d < g.length; d++) a += g[d], a = b(a, '+-a^+6');" 88 | + "a = b(a, '+-3^+b+-f');" 89 | + "a ^= Number(e[1]) || 0;" 90 | + "0 > a && (a = (a & 2147483647) + 2147483648);" 91 | + "a %= 1E6;" 92 | + "return a.toString() + '.' + (a ^ h)\n" 93 | + "}"; 94 | 95 | engine.eval(script); 96 | Invocable inv = (Invocable) engine; 97 | return (String) inv.invokeFunction("tk", val); 98 | } 99 | } -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/service/impl/MailServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.spring4all.service.impl; 2 | 3 | import com.spring4all.service.MailService; 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.beans.factory.annotation.Value; 8 | import org.springframework.core.io.ByteArrayResource; 9 | import org.springframework.mail.SimpleMailMessage; 10 | import org.springframework.mail.javamail.JavaMailSender; 11 | import org.springframework.mail.javamail.MimeMessageHelper; 12 | import org.springframework.stereotype.Service; 13 | 14 | import javax.mail.MessagingException; 15 | import javax.mail.internet.MimeMessage; 16 | 17 | @Service 18 | public class MailServiceImpl implements MailService { 19 | 20 | private static final Logger logger = LoggerFactory.getLogger(MailServiceImpl.class); 21 | 22 | @Autowired 23 | private JavaMailSender javaMailSender; 24 | 25 | @Value("${email.sender}") 26 | private String sender; 27 | 28 | @Value("${email.receiver}") 29 | private String receivers; 30 | 31 | /** 32 | * 发送文本邮件 33 | * 34 | * @param subject 邮件主题 35 | * @param text 邮件主体内容 36 | * @param receiver 37 | */ 38 | @Override 39 | public void sendText(String subject, String text, String... receiver) { 40 | SimpleMailMessage simpleMailMessage = new SimpleMailMessage(); 41 | simpleMailMessage.setFrom(sender); 42 | simpleMailMessage.setTo(receiver); 43 | simpleMailMessage.setSubject(subject); 44 | simpleMailMessage.setText(text); 45 | javaMailSender.send(simpleMailMessage); 46 | 47 | } 48 | 49 | 50 | @Override 51 | public void sendTextAndFile(String subject, String text, String fileName, String fileContent, String... receiver) { 52 | MimeMessage mimeMessage = javaMailSender.createMimeMessage(); 53 | MimeMessageHelper mimeMessageHelper = null; 54 | try { 55 | mimeMessageHelper = new MimeMessageHelper(mimeMessage, true); 56 | mimeMessageHelper.setFrom(sender); 57 | if (null == receiver || receiver.length <= 0) { 58 | if (null != receivers && receivers.trim().length() > 0) { 59 | receiver = receivers.split(","); 60 | } 61 | } 62 | mimeMessageHelper.setTo(receiver); 63 | mimeMessageHelper.addAttachment(fileName, new ByteArrayResource(fileContent.getBytes())); 64 | mimeMessageHelper.setSubject(subject); 65 | mimeMessageHelper.setText(text); 66 | } catch (MessagingException e) { 67 | logger.error("errorMessage:{}", e); 68 | throw new RuntimeException(e); 69 | } 70 | javaMailSender.send(mimeMessage); 71 | } 72 | } -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/service/impl/WeeklyPostServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.spring4all.service.impl; 2 | 3 | import com.spring4all.enums.LanguageEnum; 4 | import com.spring4all.enums.TranslatorNameEnum; 5 | import com.spring4all.factory.AbstractTranslatorFactory; 6 | import com.spring4all.factory.TranslatorFactory; 7 | import com.spring4all.service.WeeklyPostService; 8 | import com.spring4all.util.MyArrayList; 9 | import com.spring4all.util.QrCodeUtil; 10 | import com.spring4all.util.UploadImageUtil; 11 | import org.jsoup.Jsoup; 12 | import org.jsoup.nodes.Document; 13 | import org.jsoup.nodes.Element; 14 | import org.jsoup.select.Elements; 15 | import org.slf4j.Logger; 16 | import org.slf4j.LoggerFactory; 17 | import org.springframework.beans.factory.annotation.Value; 18 | import org.springframework.stereotype.Service; 19 | import org.springframework.util.StringUtils; 20 | 21 | import java.io.File; 22 | import java.io.IOException; 23 | import java.nio.file.Files; 24 | import java.nio.file.Paths; 25 | import java.util.regex.Matcher; 26 | import java.util.regex.Pattern; 27 | 28 | @Service 29 | public class WeeklyPostServiceImpl implements WeeklyPostService { 30 | 31 | private static final Logger logger = LoggerFactory.getLogger(WeeklyPostServiceImpl.class); 32 | 33 | @Value("${springio.website.index}") 34 | private String SPRING_URL; 35 | 36 | @Value("${springio.website.blog}") 37 | private String SPRING_WEEK_BLOG_URL; 38 | 39 | @Value("${springio.weekly}") 40 | private String MATCH_RULE; 41 | 42 | @Value("${springio.titlematch}") 43 | private String MATCH_PATH; 44 | 45 | @Override 46 | public String crawlWeeklyPost() { 47 | MyArrayList hrefList = new MyArrayList(); 48 | String linkHref; 49 | try { 50 | 51 | AbstractTranslatorFactory factory = new TranslatorFactory();//完成翻译工厂类 52 | 53 | Document doc = Jsoup.connect(SPRING_WEEK_BLOG_URL).get(); 54 | 55 | if (doc == null) { 56 | logger.info("打开Spring周报博客失败"); 57 | return "打开Spring周报博客失败"; 58 | } 59 | 60 | String targetLink = null; 61 | 62 | Elements hrefs = doc.select("h2.blog--title").select("a"); 63 | 64 | for (Element href : hrefs) { 65 | if (href.text().startsWith(MATCH_RULE)) { 66 | targetLink = href.attr("href"); 67 | break; 68 | } 69 | } 70 | 71 | if (!StringUtils.hasText(targetLink)) { 72 | return "解析最新的文章标题链接地址为空,页面结构可能已经变化!"; 73 | } 74 | 75 | linkHref = SPRING_URL + targetLink; 76 | 77 | Document latestBlog = Jsoup.connect(linkHref).get(); 78 | Elements allPHref = latestBlog.select("div.blog--post").select("p"); 79 | Elements allLiHref = latestBlog.select("div.blog--post").select("ul").select("li"); 80 | //处理p标签 81 | for (Element e : allPHref) { 82 | String traslateedSentence = factory.getTranslator(TranslatorNameEnum.GOOGLE).trans(LanguageEnum.EN, LanguageEnum.ZH, e.text()); 83 | String traslateedContent = new StringBuilder() 84 | .append(traslateedSentence) 85 | .append("

") 86 | .toString(); 87 | 88 | hrefList.add(traslateedContent); 89 | for (Element el : e.select("a")) { 90 | hrefList.add( 91 | new StringBuilder() 92 | .append(el.attr("href")) 93 | .append("

") 94 | .toString() 95 | ); 96 | String url = el.attr("href"); 97 | addImage(hrefList, url); 98 | } 99 | hrefList.add("
"); 100 | } 101 | //处理Li标签 102 | for (int i = 0; i < allLiHref.size(); i++) { 103 | hrefList.add(i + 1 + ":  "); 104 | //把翻译结果添加List中去 105 | hrefList.add(factory.getTranslator(TranslatorNameEnum.GOOGLE).trans(LanguageEnum.EN, LanguageEnum.ZH, allLiHref.get(i).text()) + "

"); 106 | for (Element el : allLiHref.get(i).select("a")) { 107 | hrefList.add(el.attr("href") + "

"); 108 | String url = el.attr("href"); 109 | addImage(hrefList, url); 110 | 111 | } 112 | } 113 | saveContent(hrefList, linkHref); 114 | } catch (Exception e) { 115 | logger.error("errorMessage:{}", e); 116 | } finally { 117 | return hrefList.toString(); 118 | } 119 | } 120 | 121 | private void saveContent(MyArrayList hrefList, String linkHref) throws IOException { 122 | Pattern p = Pattern.compile(MATCH_PATH); 123 | Matcher m = p.matcher(linkHref); 124 | boolean matched = m.matches(); 125 | if (matched) { 126 | String fileName = m.group(1).replaceAll("\\/","") + ".md"; 127 | String targetPath = new File(System.getProperty("user.dir")) + "/translated/" + fileName; 128 | // 对当前翻译内容进行归档保存 129 | Files.write(Paths.get(targetPath), hrefList.toString().getBytes()); 130 | } 131 | } 132 | 133 | //添加图片 134 | public void addImage(MyArrayList hrefList, String url) { 135 | String returnUrl = UploadImageUtil.upLoad(QrCodeUtil.createCode(url), url.substring(0, 13)); 136 | hrefList.add("

"); 137 | } 138 | 139 | } 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/service/translate/http/AbstractHttpParams.java: -------------------------------------------------------------------------------- 1 | package com.spring4all.service.translate.http; 2 | 3 | import org.apache.http.client.methods.CloseableHttpResponse; 4 | import org.apache.http.impl.client.CloseableHttpClient; 5 | import org.apache.http.impl.client.HttpClients; 6 | import org.apache.http.util.EntityUtils; 7 | 8 | import java.io.InputStream; 9 | import java.util.HashMap; 10 | import java.util.Map; 11 | 12 | public abstract class AbstractHttpParams implements HttpParams{ 13 | protected final Map params = new HashMap<>(); 14 | 15 | @Override 16 | public HttpParams put(String key, String value){ 17 | params.put(key, value); 18 | return this; 19 | } 20 | 21 | @Override 22 | public String send2String(String baseUrl) throws Exception { 23 | CloseableHttpClient httpClient = HttpClients.createDefault(); 24 | try{ 25 | CloseableHttpResponse response = send(httpClient, baseUrl); 26 | return EntityUtils.toString(response.getEntity()); 27 | }finally{ 28 | httpClient.close(); 29 | } 30 | } 31 | 32 | @Override 33 | public InputStream send2InputStream(String baseUrl) throws Exception { 34 | CloseableHttpClient httpClient = HttpClients.createDefault(); 35 | try{ 36 | CloseableHttpResponse response = send(httpClient, baseUrl); 37 | return response.getEntity().getContent(); 38 | }finally{ 39 | httpClient.close(); 40 | } 41 | } 42 | 43 | abstract protected CloseableHttpResponse send(CloseableHttpClient httpClient, String baseUrl) throws Exception ; 44 | } 45 | -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/service/translate/http/HttpGetParams.java: -------------------------------------------------------------------------------- 1 | package com.spring4all.service.translate.http; 2 | 3 | import org.apache.http.client.methods.CloseableHttpResponse; 4 | import org.apache.http.client.methods.HttpGet; 5 | import org.apache.http.client.methods.HttpUriRequest; 6 | import org.apache.http.client.utils.URIBuilder; 7 | import org.apache.http.impl.client.CloseableHttpClient; 8 | 9 | public class HttpGetParams extends AbstractHttpParams{ 10 | 11 | @Override 12 | protected CloseableHttpResponse send(CloseableHttpClient httpClient, String baseUrl) throws Exception { 13 | URIBuilder uri = new URIBuilder(baseUrl); 14 | for (String key : params.keySet()) { 15 | String value = params.get(key); 16 | uri.addParameter(key, value); 17 | } 18 | HttpUriRequest request = new HttpGet(uri.toString()); 19 | return httpClient.execute(request); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/service/translate/http/HttpMimeParams.java: -------------------------------------------------------------------------------- 1 | package com.spring4all.service.translate.http; 2 | 3 | import org.apache.http.HttpEntity; 4 | import org.apache.http.client.methods.CloseableHttpResponse; 5 | import org.apache.http.client.methods.HttpPost; 6 | import org.apache.http.entity.ContentType; 7 | import org.apache.http.entity.mime.MultipartEntityBuilder; 8 | import org.apache.http.entity.mime.content.FileBody; 9 | import org.apache.http.entity.mime.content.StringBody; 10 | import org.apache.http.impl.client.CloseableHttpClient; 11 | 12 | import java.io.File; 13 | 14 | public class HttpMimeParams extends AbstractHttpParams { 15 | 16 | @Override 17 | protected CloseableHttpResponse send(CloseableHttpClient httpClient, String baseUrl) throws Exception { 18 | //1)构建实体 19 | MultipartEntityBuilder entBuilder = MultipartEntityBuilder.create(); 20 | for (String key : params.keySet()) { 21 | Object item = params.get(key); 22 | if(item instanceof File){ 23 | File file = (File)item; 24 | if((!file.exists()) || (file.isDirectory())){ 25 | throw new Exception("file error"); 26 | } 27 | entBuilder.addPart(key, new FileBody(file)); 28 | }else if(item instanceof String){ 29 | String value = (String)item; 30 | entBuilder.addPart(key, new StringBody(value, ContentType.TEXT_PLAIN)); 31 | }else{ 32 | throw new Exception(item.getClass().toString()+" not support"); 33 | } 34 | } 35 | HttpEntity reqEntity = entBuilder.build(); 36 | 37 | //2)发送并等待回复 38 | HttpPost request = new HttpPost(baseUrl); 39 | request.setEntity(reqEntity); 40 | return httpClient.execute(request); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/service/translate/http/HttpParams.java: -------------------------------------------------------------------------------- 1 | package com.spring4all.service.translate.http; 2 | 3 | import java.io.InputStream; 4 | 5 | public interface HttpParams { 6 | public String send2String(String baseUrl) throws Exception; 7 | public InputStream send2InputStream(String baseUrl) throws Exception; 8 | public HttpParams put(String key, String value); 9 | } 10 | -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/service/translate/http/HttpPostParams.java: -------------------------------------------------------------------------------- 1 | package com.spring4all.service.translate.http; 2 | 3 | import org.apache.http.NameValuePair; 4 | import org.apache.http.client.config.CookieSpecs; 5 | import org.apache.http.client.config.RequestConfig; 6 | import org.apache.http.client.entity.UrlEncodedFormEntity; 7 | import org.apache.http.client.methods.CloseableHttpResponse; 8 | import org.apache.http.client.methods.HttpPost; 9 | import org.apache.http.impl.client.CloseableHttpClient; 10 | import org.apache.http.message.BasicNameValuePair; 11 | 12 | import java.util.ArrayList; 13 | import java.util.List; 14 | 15 | public class HttpPostParams extends AbstractHttpParams{ 16 | @Override 17 | protected CloseableHttpResponse send(CloseableHttpClient httpClient, String base) throws Exception { 18 | List formparams = new ArrayList(); 19 | for (String key : params.keySet()) { 20 | String value = params.get(key); 21 | formparams.add(new BasicNameValuePair(key, value)); 22 | } 23 | HttpPost request = new HttpPost(base); 24 | 25 | RequestConfig localConfig = RequestConfig.custom() 26 | .setCookieSpec(CookieSpecs.STANDARD) 27 | .build(); 28 | request.setConfig(localConfig); 29 | request.setEntity(new UrlEncodedFormEntity(formparams, "UTF-8")); 30 | request.setHeader("Content-Type", "application/x-www-form-urlencoded"); //内容为post 31 | return httpClient.execute(request); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/util/JsoupUtil.java: -------------------------------------------------------------------------------- 1 | package com.spring4all.util; 2 | 3 | import org.jsoup.Jsoup; 4 | import org.jsoup.nodes.Document; 5 | import org.slf4j.Logger; 6 | import org.slf4j.LoggerFactory; 7 | 8 | import java.io.IOException; 9 | 10 | public class JsoupUtil { 11 | private static Logger logger = LoggerFactory.getLogger(JsoupUtil.class); 12 | 13 | public static Document getDocument(String url) { 14 | Document document = null; 15 | try { 16 | document = Jsoup.connect(url).get(); 17 | return document; 18 | } catch (IOException e) { 19 | logger.error("occur error:{}", e); 20 | } 21 | return document; 22 | 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/util/MyArrayList.java: -------------------------------------------------------------------------------- 1 | package com.spring4all.util; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Iterator; 5 | 6 | //重写toStirng方法,不要默认的 7 | public class MyArrayList extends ArrayList { 8 | @Override 9 | public String toString() { 10 | if (isEmpty()) { 11 | return "[]"; 12 | } 13 | 14 | StringBuilder buffer = new StringBuilder(size() * 16); 15 | Iterator it = iterator(); 16 | while (it.hasNext()) { 17 | Object next = it.next(); 18 | if (next != this) { 19 | buffer.append(next); 20 | } else { 21 | buffer.append("(this Collection)"); 22 | } 23 | if (it.hasNext()) { 24 | 25 | } 26 | } 27 | return buffer.toString(); 28 | } 29 | } -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/util/QrCodeUtil.java: -------------------------------------------------------------------------------- 1 | package com.spring4all.util; 2 | 3 | import net.glxn.qrgen.core.image.ImageType; 4 | import net.glxn.qrgen.javase.QRCode; 5 | 6 | import java.io.ByteArrayOutputStream; 7 | 8 | /** 9 | * Created by maskwang on 2017/10/9 0009. 10 | */ 11 | public class QrCodeUtil { 12 | public static byte[] createCode(String url){ 13 | ByteArrayOutputStream bout = 14 | QRCode.from(url) 15 | .withSize(250, 250) 16 | .to(ImageType.PNG) 17 | .stream(); 18 | return bout.toByteArray(); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /officlialblog/src/main/java/com/spring4all/util/UploadImageUtil.java: -------------------------------------------------------------------------------- 1 | package com.spring4all.util; 2 | 3 | import com.qiniu.common.QiniuException; 4 | import com.qiniu.http.Response; 5 | import com.qiniu.storage.UploadManager; 6 | import com.qiniu.util.Auth; 7 | import org.slf4j.Logger; 8 | import org.slf4j.LoggerFactory; 9 | 10 | /** 11 | * Created by maskwang on 2017/10/9 0009. 12 | */ 13 | public class UploadImageUtil { 14 | 15 | public static Logger logger= LoggerFactory.getLogger(UploadImageUtil.class); 16 | 17 | public static final String RETURNURL="http://oxjys514c.bkt.clouddn.com/"; 18 | public static final String ACCESS_KEY = "C35NvihMxcnt4iVZU3GVepxVYnxz06XQv4m4hWkN"; // 你的access_key 19 | public static final String SECRET_KEY = "qMrvAcHaDx9OiMbBHSEXc-UxFxtgznBp5B1IG1mo"; // 你的secret_key 20 | public static final String BUCKET_NAME = "spring4all"; // 你的buket_name 21 | 22 | public static String upLoad(byte[]bytes,String imageName){ 23 | Auth auth = Auth.create(ACCESS_KEY, SECRET_KEY); 24 | UploadManager uploadManager = new UploadManager(); 25 | try { 26 | //调用put方法上传 27 | Response res = uploadManager.put(bytes,imageName,auth.uploadToken(BUCKET_NAME)); 28 | //bytes, RETURNNAME, getUpToken(auth,BUCKET_NAME) 29 | //打印返回的信息 30 | logger.info(res.bodyString()); 31 | } catch (QiniuException e) { 32 | Response r = e.response; 33 | // 请求失败时打印的异常的信息 34 | logger.info(r.toString()); 35 | try { 36 | //响应的文本信息 37 | System.out.println(r.bodyString()); 38 | } catch (QiniuException e1) { 39 | //ignore 40 | } 41 | } 42 | return RETURNURL+imageName; 43 | } 44 | //简单上传,使用默认策略,只需要设置上传的空间名就可以了 45 | public static String getUpToken(Auth auth,String bucketName){ 46 | return auth.uploadToken(bucketName); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /officlialblog/src/main/resources/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: httpcore-4.4.6.jar spring-webmvc-4.3.8.RELEASE.jar jcl-ove 3 | r-slf4j-1.7.25.jar spring-boot-devtools-1.5.3.RELEASE.jar classmate-1 4 | .3.3.jar spring-expression-4.3.8.RELEASE.jar jul-to-slf4j-1.7.25.jar 5 | logback-classic-1.1.11.jar spring-boot-starter-logging-1.5.3.RELEASE. 6 | jar logback-core-1.1.11.jar junit-4.12.jar httpmime-4.5.3.jar core-2. 7 | 0.jar spring-boot-autoconfigure-1.5.3.RELEASE.jar tomcat-embed-el-8.5 8 | .14.jar log4j-over-slf4j-1.7.25.jar tomcat-embed-websocket-8.5.14.jar 9 | spring-boot-starter-1.5.3.RELEASE.jar slf4j-api-1.7.25.jar spring-ao 10 | p-4.3.8.RELEASE.jar okhttp-2.3.0.jar spring-context-support-4.3.8.REL 11 | EASE.jar spring-beans-4.3.8.RELEASE.jar jackson-core-2.8.8.jar gson-2 12 | .8.0.jar okio-1.3.0.jar jackson-annotations-2.8.0.jar jboss-logging-3 13 | .3.1.Final.jar javase-3.1.0.jar jackson-databind-2.8.8.jar spring-boo 14 | t-starter-tomcat-1.5.3.RELEASE.jar javax.mail-1.5.6.jar spring-core-4 15 | .3.8.RELEASE.jar snakeyaml-1.17.jar hamcrest-core-1.3.jar spring-boot 16 | -starter-mail-1.5.3.RELEASE.jar spring-boot-starter-web-1.5.3.RELEASE 17 | .jar validation-api-1.1.0.Final.jar httpclient-4.5.3.jar core-3.1.0.j 18 | ar spring-boot-1.5.3.RELEASE.jar spring-context-4.3.8.RELEASE.jar tom 19 | cat-embed-core-8.5.14.jar javase-2.0.jar hibernate-validator-5.3.5.Fi 20 | nal.jar fastjson-1.2.14.jar jsoup-1.10.2.jar commons-codec-1.10.jar j 21 | freesvg-2.1.jar spring-web-4.3.8.RELEASE.jar activation-1.1.jar qiniu 22 | -java-sdk-7.0.0.jar 23 | Main-Class: com.spring4all.App 24 | 25 | -------------------------------------------------------------------------------- /officlialblog/src/main/resources/application-dev.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 9900 3 | 4 | -------------------------------------------------------------------------------- /officlialblog/src/main/resources/application-prod.yml: -------------------------------------------------------------------------------- 1 | server: 2 | port: 9999 3 | 4 | -------------------------------------------------------------------------------- /officlialblog/src/main/resources/application.yml: -------------------------------------------------------------------------------- 1 | 2 | spring: 3 | profiles: 4 | active: dev 5 | mail: 6 | default-encoding: utf-8 7 | host: smtp.163.com 8 | username: email_chenzhijun@163.com 9 | password: chenzhijun1995 10 | 11 | springio: 12 | website: 13 | index: https://spring.io 14 | blog: ${springio.website.index}/blog 15 | weekly: This Week in Spring 16 | titlematch: .*(\d{4}/\d{1,2}/\d{1,2}).* 17 | # 每周二下午20点 18 | time: "0 0 20 ? * 2" 19 | 20 | email: 21 | sender: email_chenzhijun@163.com 22 | receiver: email_chenzhijun@163.com,522858454@qq.com 23 | 24 | 25 | -------------------------------------------------------------------------------- /officlialblog/src/main/resources/static/qr-code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SpringForAll/ThisWeekInSpringTranslate/ca6212973f122c5c5e09ed4f29c49458b986c22f/officlialblog/src/main/resources/static/qr-code.png -------------------------------------------------------------------------------- /officlialblog/src/test/java/MailTest.java: -------------------------------------------------------------------------------- 1 | import com.spring4all.App; 2 | import com.spring4all.service.impl.MailServiceImpl; 3 | import org.junit.Test; 4 | import org.junit.runner.RunWith; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.boot.test.context.SpringBootTest; 7 | import org.springframework.test.context.junit4.SpringRunner; 8 | 9 | import javax.mail.MessagingException; 10 | 11 | @RunWith(SpringRunner.class) 12 | @SpringBootTest(classes = App.class) 13 | public class MailTest { 14 | 15 | @Autowired 16 | MailServiceImpl mailService; 17 | 18 | // @Before 19 | // public void init() { 20 | // if (null == mailService) { 21 | // mailService = new MailService(); 22 | // } 23 | // } 24 | 25 | @Test 26 | public void senMailText() { 27 | mailService.sendText("标题-测试邮件", "邮件主体内容", new String[]{"1490520869@qq.com", "522858454@qq.com"}); 28 | } 29 | 30 | @Test 31 | public void sendMailFile() throws MessagingException { 32 | mailService.sendTextAndFile("标题","邮件主题内容","weekly.md","周报文件内容","1490520869@qq.com","522858454@qq.com"); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /officlialblog/src/test/java/QRImageGenerateTest.java: -------------------------------------------------------------------------------- 1 | import net.glxn.qrgen.core.image.ImageType; 2 | import net.glxn.qrgen.javase.QRCode; 3 | 4 | import java.io.*; 5 | import java.util.regex.Matcher; 6 | import java.util.regex.Pattern; 7 | 8 | /** 9 | * 测试生成二维码图片 10 | * 11 | * @author bwh 12 | * @see {http://kenglxn.github.io/QRGen/} 13 | * @since 2017/10/9 14 | */ 15 | public class QRImageGenerateTest { 16 | 17 | public static void main(String[] args) { 18 | 19 | ByteArrayOutputStream bout = 20 | QRCode.from("http://memorynotfound.com") 21 | .withSize(250, 250) 22 | .to(ImageType.PNG) 23 | .stream(); 24 | 25 | 26 | try { 27 | OutputStream out = new FileOutputStream("/picture/qr-code.png"); 28 | bout.writeTo(out); 29 | out.flush(); 30 | out.close(); 31 | 32 | } catch (FileNotFoundException e) { 33 | e.printStackTrace(); 34 | } catch (IOException e) { 35 | e.printStackTrace(); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /officlialblog/translated/20171010.md: -------------------------------------------------------------------------------- 1 | 嗨春风扇!欢迎来到本周的另一期春季!幸福的巧合,今天也是阿达Lovelace的一天。根据“寻找Ada”网站:Ada Lovelace Day(ALD)是科学,技术,工程和数学(STEM)妇女成就的国际庆祝活动。它旨在增加STEM女性的素质,并在此创造新的榜样,鼓励更多的女孩进入STEM职业,并支持已经在STEM工作的女性。快乐阿达Lovelace天!

https://findingada.com/




我刚刚从波兰弗罗茨瓦夫的史诗级ByteMyCode会议回来,现在正在华盛顿州西雅图与客户交谈,并于今天在西雅图举行了一场关于Cloud Native Java的开放活动。今天晚些时候,我去加拿大多伦多访问客户,并出现在本周晚些时候发布的SpringOne平台预览展示。如果你在周围,不要犹豫,停下来,嗨!

https://bytemycode.pl/



http://connect.pivotal.io/Survival-is-not-Mandatory-Seattle.html



https://www.meetup.com/Toronto-Pivotal-User-Group/events/243155539/




1:  Spring Security主管Rob Winch刚刚宣布了Spring Security 5.0.0.M5。新版本包括错误修复和新功能。发布更新到Spring Framework 5.0.0.RELEASE,Reactor Bismuth-RELEASE和Spring Data Kay RELEASE。

https://spring.io/blog/2017/10/10/spring-security-5-0-0-m5-released



2:  Spring Security主管Rob Winch刚刚宣布了Spring Session 2.0.0.M5。新版本带来Redis ReactiveSessionRepository实现。

https://spring.io/blog/2017/10/10/spring-session-2-0-0-m5-released



3:  在上周的Spring Tips中,我看了反应Spring Security 5。

https://spring.io/blog/2017/10/04/spring-tips-reactive-spring-security



4:  Spring集成忍者Artem Bilan刚刚宣布了Spring AMQP 2.0.0.RELEASE。这个新版本包括完整的Java 8和Spring Framework 5.0支持;一个新的spring-rabbit-junit神器与一些有用的测试工具,包括一个BrokerRunning JUnit @Rule;版本5.0的amqp-client库; DirectMessageListenerContainer允许直接在客户端线程上使用消息,而不是SimpleMessageListenerContainer中基于队列的逻辑;一个新的RabbitOperations.invoke()用于在专用的线程绑定通道上批量的模板操作; Logback AmqpAppender的编码器支持;大量的错误修复等等。看看发行!

https://spring.io/blog/2017/10/05/spring-amqp-2-0-0-release-available



5:  Spring Data Lead John Blum刚刚宣布了Spring Session Data Geode / GemFire 2.0.0.M2。这个新版本升级到Spring Framework 5.0.0,Spring Data Kay RELEASE,Spring Session 2.0.0.M4,Spring Boot 2.0.0.M4,并增加了Pivotal GemFire和Apache Geode PDX Serialization支持。

https://spring.io/blog/2017/10/06/spring-session-data-geode-gemfire-2-0-0-m2-available



6:  Spring Cloud Vault主管Mark Paluch刚刚宣布了Spring Vault 1.1.0.GA和2.0.0.M3。新的1.1.0版本包括对AuthRole身份验证的拉模式支持,使用AWS IAM的Vault登录,批处理传输操作的支持,基于其租用持续时间轮换通用秘密,并引入VaultEndpointProvider动态配置端点。 2.0.M3包括基于Spring Data KeyValue之上的@EnableVaultRepositories注解的保管库,它包括创建和修改表示为JSON的Vault的策略的支持。

https://spring.io/blog/2017/10/06/spring-vault-1-1-0-ga-and-2-0-0-m3-available



7:  Spring Cloud忍者Vinicius Carvalho刚刚宣布了Spring Cloud Stream 1.3.0。新版本包括对Kafka Streams的支持,RabbitMQ的重试支持,懒惰队列(包括DLQ支持),滞后指标(了解为什么事情减缓)等等。查看这篇文章和在线YouTube视频更多!

https://spring.io/blog/2017/10/06/spring-cloud-stream-1-3-goes-ga



8:  Spring忍者Stephane Nicoll刚刚宣布了Spring Framework 4.3.12。这是一个维护版本,具有多项修复和选择的改进。

https://spring.io/blog/2017/10/10/spring-framework-4-3-12-available-now



9:  我喜欢Dave Syer博士在OpenSlava 2017展会上的无缝机会。这是Spring Cloud Function中的概念(和代码),很有趣。

https://www.youtube.com/watch?v=I2Yu3YoC-mw



10:  Baeldung更新了与Netflix Hystrix断路器的Spring Cloud集成的覆盖面。

http://www.baeldung.com/spring-cloud-netflix-hystrix



11:  看到RedHat拥抱Spring Boots真的很酷,但是使用Kubernetes ConfigMaps来管理秘密(如密码或信誉)的这篇文章忽略了更强大的功能(更不用说平台无关)Spring Cloud Config Server。

https://developers.redhat.com/blog/2017/10/04/configuring-spring-boot-kubernetes-secrets/



https://cloud.spring.io



https://github.com/spring-cloud-samples/configserver



12:  我喜欢这个MemoryNotFound博客文章,使用Spring Boot与ActiveMQ(或一般只是JMS)。

http://memorynotfound.com/spring-boot-activemq-queue-point-point-configuration-example/



13:  或者很自己的Sebastien Deleuze刚刚更新了与KotlinX Coroutines项目的Project Reactor集成。

https://github.com/sdeleuze/reactor-kotlin-jdbc/



14:  我喜欢这个Spring Boot和Kotlin版本的着名PetClinic示例

https://t.co/WkdaeR4Wtt?ssr=true



15:  Reactor的KotlinX协同程序支持 - 这是支持Spring Framework 5的Spring WebFlux本身的活动库 - 已更新为Reactor Bismuth发行列车。

https://github.com/Kotlin/kotlinx.coroutines/commit/ac8b6da408a61b5617428069b3f13c2fdf8f9951



16:  我真的很喜欢斯蒂芬·扬森(Stephen Janssen),看看Java 9或更高版本的发展。

https://t.co/xLfRVlqOAf?ssr=true



17:  NewStack在这篇文章中讨论了Spring Framework 5中的反应性支持

https://thenewstack.io/spring-framework-5-supports-reactive-programming/?_lrsc=bc96c10d-7cfc-4f6f-9fb8-d65eef8a3b86



18:  Alex Nesterov看到使用Kotlinx协议扩展,用于基于Spring Framework 5的代码。这是一个有趣的工作。

http://blog.alexnesterov.com/post/kotlin-coroutines-in-spring/



19:  新版本的Activiti 7(一个开放源码BPMN工作流引擎)配有一个材料清单Maven工件,还有Spring Boot / Spring Cloud-ready启动器和集成,看起来很棒。

https://github.com/Activiti/Activiti/wiki/Activiti-7-Roadmap



20:  Java在2017年 - JetBrains的开发者生态系统状态

http://www.jetbrains.com/research/devecosystem-2017/java/



21:  Ham Vocke在测试微服务上放置了一个非常好的帖子。我喜欢这篇文章,虽然我将使用Spring Cloud Contract而不是Pact。 Spring Cloud Contract也可以支持Pact文件。

http://www.hamvocke.com/blog/testing-java-microservices/



22:  在Ordina JWorks博客的这个惊人的帖子中,Dieter Hubau帮助Rick(来自Rick&Morty)将惊人的麦当劳木兰四川酱与Spring Cloud Stream连接起来。

https://ordina-jworks.github.io/spring/2017/10/04/Spring-Cloud-Stream-Rick-And-Morty-Adventure.html



23:  Thymeleaf领导Daniel Fernandez刚刚宣布,Thymeleaf 3.0.8已经发布!在这个版本中有很多新功能,但我最喜欢的是Spring 5集成模块,thymeleaf-spring5的GA版本,这使得以反应的方式使用百里香。

http://forum.thymeleaf.org/Thymeleaf-3-0-8-JUST-PUBLISHED-td4030687.html



-------------------------------------------------------------------------------- /translated/20170829.md: -------------------------------------------------------------------------------- 1 | 嗨,所有的Spring粉丝们!欢迎来到本周的Spring周报另一部分!本周我在中国北京举行了盛大的Spring峰会,看到来自中国各地的技术人员汇聚国会大厦,讨论了关于云原生和Spring的各个方面。 2 | 接下来我将去深圳,中国香港拜访客户!完美的香港秀!(http://www.yowconference.hk/) 3 | 1.Pivotal已经发布了Cloud Foundry的Concourse CI管道工具的商业版本。快去看看它和Spring Cloud Pipelines吧! 4 | 5 | https://content.pivotal.io/announcements/security-innovation-through-platform-automation-pivotal-launches-concourse-for-pivotal-cloud-foundry 6 | 7 | https://spring.io/blog/2016/10/18/spring-cloud-pipelines 8 | 9 | 2.我很喜欢Bruno Leite在关于Spring Boot的REST API中错误的处理这篇文章。 10 | 11 | https://www.toptal.com/java/spring-boot-rest-api-error-handling 12 | 13 | 3.你可能会喜欢Baeldung这篇使用GraphQL与Spring Boot的帖子 14 | 15 | http://www.baeldung.com/spring-graphql 16 | 17 | 4.以下这个项目似乎很有趣,尽管我还没有使用它。它允许你在SpringBoot应用程序中使用ModelMapper。 18 | 19 | http://modelmapper.org/ 20 | 21 | https://github.com/rozidan/modelmapper-spring-boot-starter 22 | 23 | 5.社区大佬汤米路德维希注意到Bitbucket现在运行在SpringBoot之上!这是一个很好的创举。 24 | 25 | https://confluence.atlassian.com/bitbucketserver/bitbucket-server-5-0-release-notes-889528342.html#BitbucketServer5.0releasenotes-CustomizationstoBitbucket'sserver.xmlfilemustbemigratedtobitbucket.properties 26 | 27 | 6.这个帖子是一个陈旧的,但它还是好的,因为我的JavaScrip功底不是很厉害。看看它如何使用Angular(2或着更高)与由Spring Boot应用程序驱动的websockets。 28 | 29 | http://mmrath.com/post/websockets-with-angular2-and-spring-boot/ 30 | 31 | 7.IntelliJ大佬Trisha Gee着眼于IntelliJ IDEA 2017.2的新功能,旨在支持Spring Boot应用程序。 32 | 33 | https://blog.jetbrains.com/idea/2017/08/intellij-idea-2017-2-spring-boot-improvements/ 34 | 35 | 8.分布式追踪大牛阿德里安·科尔(Adrian Cole)在microXchg对话中谈到如何正确地看待延迟的事情。 36 | 37 | https://www.infoq.com/presentations/distributed-tracing-zipkin 38 | 39 | 9.这篇文章是David Dawson的一个演讲。它与Spring本身无关,并且与事件驱动架构有关。这是一个很好的讨论,你将在Spring Cloud Stream,Spring Cloud Data Flow和Axon等技术中找到支持的工具。 40 | 41 | https://www.infoq.com/news/2017/08/selecting-event-architecture 42 | 43 | 10.我喜欢这个Java 9中正则表达式的新支持。 44 | 45 | https://javax0.wordpress.com/2017/08/16/new-regex-features-in-java-9/amp/ 46 | 47 | 11.美国政府成立已久的负责数字转换的部门正在寻找一些熟悉Cloud Foundry的云端人士来帮助他们。 48 | 49 | https://18f.gsa.gov/join/ 50 | -------------------------------------------------------------------------------- /translated/20170905.md: -------------------------------------------------------------------------------- 1 | Spring的粉丝们,欢迎来到本周的另一期官方周报!这个星期我在香港看这个惊人的YOW!然后是新加坡的YOW。这些会议都是来自澳大利亚顶尖的会议,而且会议很新颖。如果你在这两个地方,我希望你会来。 2 | 3 | http://www.yowconference.hk/ 4 | 5 | http://www.yowconference.sg/ 6 | 7 | 8 | 9 | 1.介绍下关于Spring Cloud Data Flow最重要的一个方面。 Spring Cloud Data Flow大牛Eric Bottard首先介绍了Spring Cloud Data Flow Shell本身。 10 | 11 | https://spring.io/blog/2017/08/29/spring-cloud-data-flow-tips-tricks-interacting-with-the-shell 12 | 13 | 2.Spring Cloud贡献者Ryan Baxter刚刚宣布了Spring Cloud Edgeware M1 的发布。新版本包括对各种项目的更新以及新的Spring Cloud Gateway项目。此版本基于Spring Boot 1.5.x。 14 | 15 | https://spring.io/blog/2017/08/29/spring-cloud-edgware-m1-is-now-available 16 | 17 | 3.Spring Cloud联合创始人Spencer Gibb刚刚宣布了Spring Cloud Finchely M2的发布。这个新版本基于Spring Boot 2.0.x,所以是基于Java 8。它还支持Spring Cloud Gateway中更多更酷的功能。在Spring Cloud Gateway和其他版本中,一个常见主题是反应性支持。 18 | 19 | https://spring.io/blog/2017/08/30/spring-cloud-finchley-m2-is-available 20 | 21 | 4.Spring Cloud Flow大牛Thomas Risberg在本文中介绍了针对Kubernetes的Spring Cloud Data Flow的Helm安装程序。 Helm是Kubernetes的包管理者。 22 | 23 | https://spring.io/blog/2017/08/31/simple-installation-of-data-flow-for-kubernetes-with-helm 24 | 25 | 5.这个应用现代化的Pivotal和Apigee白皮书是一个很好的阅读题材。 26 | 27 | https://content.pivotal.io/apigee/application-modernization?_lrsc=9d76ba9e-eb43-42fb-b85d-9e5b48373ac4 28 | 29 | 6.Matt McCandless称Spring Boot老而弥新,这是个很好的起步。 30 | 31 | https://dzone.com/articles/spring-boot-the-right-boot-for-you-1 32 | 33 | 7.这篇关于使用Spring Boot的Quartz Scheduler的文章是曾经看过的一篇文章。我喜欢。 34 | 35 | http://www.opencodez.com/java/quartz-scheduler-with-spring-boot.htm 36 | 37 | 8.看起来要想Java 9发布,这个新的Java版本将会有6个月的时间。我个人欢迎新版本。 38 | 39 | https://jcp.org/aboutJava/communityprocess/ec-public/materials/2017-08-15/JCP-EC-Minutes-August-2017.html 40 | 41 | 9.我真的很喜欢这个俄语的帖子,介绍Spring Boot的应用程序开发。 42 | 43 | https://alexkosarev.name/2017/08/08/application-development-with-spring-part-1/ 44 | 45 | 10.上周Pivotal与Google和VMWare合作,宣布了Pivotal Cloud Foundry生态系统 - Pivotal Container Service - 由BOSH管理的Kubernetes服务的下一步工作。我们从TechCrunch片中得到一些细节。 46 | 47 | https://www.blog.google/topics/google-cloud/vmware-and-pivotal-launch-new-hybrid-kubernetes-solution-optimized-gcp/ 48 | 49 | https://techcrunch.com/2017/08/29/seven-moves-that-led-to-the-vmware-pivotal-google-partnership/amp/ 50 | 51 | 11.我喜欢这个Auth0在集成Spring Boot与SQL数据库(PostgreSQL),JPA和Liquibase。 52 | 53 | https://auth0.com/blog/integrating-spring-data-jpa-postgresql-liquibase/ 54 | 55 | 12.来自JHipster的这篇关于“API优先开发”的文章很有趣。 56 | 57 | http://www.jhipster.tech/doing-api-first-development/ 58 | 59 | 13.Spring Boot 2.0具有反应弹性框架5和Java 8基准线,肯定会令人印象深刻。新版本中我最喜欢的功能之一就是支持Spring Boot Actuator端点的REST-stack(响应式Spring WebFlux,Spring MVC或JAX-RS)。 60 | 61 | https://www.infoq.com/news/2017/08/spring-boot-2-actuator-endpoints 62 | 63 | 14.看看这个优秀的网络研讨会,了解为什么IntelliJ IDEA是Grails应用程序的首选。我喜欢这个,因为Grails 3是基于Spring Boot的,因为Jeff Scott Brown是一个伟大的演讲者,因为IntelliJ做了一个漂亮的好IDE。 64 | 65 | https://blog.jetbrains.com/idea/2017/07/webinar-recording-why-intellij-idea-is-the-premier-ide-for-grails-3/ 66 | 67 | 15.严格来说,这与Spring不是很相关,但它是值得一读的。丹尼尔·布莱恩特(Daniel Bryant)在这篇文章中描述了测试微服务(以及您可能使用的所有组件)的全方位方法。 68 | 69 | https://specto.io/blog/2016/8/16/recipe-for-designing-building-testing-microservices/ 70 | 71 | 16.我喜欢这个来自Spring Data的StackOverflow响应Oliver Gierke:如何在Spring Boot中选择性升级依赖项? 72 | 73 | https://stackoverflow.com/questions/45967464/how-to-selectively-upgrade-a-dependency-in-spring-boot-sample-case-spring-dat 74 | 75 | 17.如果您想快速了解一下Cloud Foundry服务代理商,请阅读本文。 76 | 77 | http://www.automate-it.today/about-cloud-foundry-service-brokers/ 78 | 79 | 18.这篇也不是严格来说与Spring有关,但对于构建云原生应用程序的一些Spring用户来说,这对于Java云主机服务的成本降低策略来说非常有用。 80 | 81 | https://www.infoq.com/articles/java-cloud-cost-reduction 82 | -------------------------------------------------------------------------------- /translated/20170912.md: -------------------------------------------------------------------------------- 1 | 2 | Hi,Spring的粉丝们!本周我在新加坡获得了惊人的YOW(尖叫),并与客户交谈。 此外,我会在互动测试中开展一个聚会,不要错过! 3 | 4 | http://www.yowconference.sg/program/ 5 | 6 | https://www.meetup.com/singasug/events/243106673/ 7 | 8 | 1.Spring5已经刷屏啦!Spring Framework主管Juergen Hoeller刚刚宣布发布了Spring Framework 5.0.RC4,Spring Boot 2.0.M4,JUnit 5和Reactor 3.1 RC1。这可能是Spring5发布前最后评测bug的机会!这个版本里有太多新东西! 9 | 10 | https://spring.io/blog/2017/09/11/spring-framework-5-0-rc4-available-now 11 | 12 | 2.Spring Cloud孵化器中有一个Spring Cloud Config Server MongoDB项目,这非常有趣。试试看! 13 | 14 | https://github.com/spring-cloud-incubator/spring-cloud-config-server-mongodb 15 | 16 | 3.Spring框架大牛StéphaneNic​​oll刚刚宣布了发布Spring Framework 4.3.11。 17 | 18 | https://spring.io/blog/2017/09/11/spring-framework-4-3-11-available-now 19 | 20 | 4.Spring Cloud和Spring Date 大牛Mark Paluch刚刚宣布了Spring Cloud Vault 1.1.0.RC1的发布。此版本包括针对AppRole身份验证的pull模式支持和文档的新HTML样式。 21 | 22 | https://spring.io/blog/2017/09/11/spring-vault-1-1-0-rc1-available 23 | 24 | 5.Spring Data大牛Mark Paluch刚刚宣布推出Spring Data Ingalls Sr7和Kay RC3。新版本都包含值得推荐更新。 25 | 26 | https://spring.io/blog/2017/09/11/spring-data-ingalls-sr7-and-kay-rc3-released 27 | 28 | 6.想了解更多关于Spring Framework 5.0.GA中对reactive 支持?不要错过今年10月4日的网络研讨会! 29 | 30 | https://content.pivotal.io/webinars/oct-4-getting-reactive-with-spring-framework-5-0-s-ga-release-webinar?_lrsc=987dec05-e850-4874-9f15-2a2b5f8056ac 31 | 32 | 7.我们的好友Matt Raible在Java开发人员的NoSQL的Okta博客上做精彩的总结。该帖子主要是关于技术理解的一个非常有趣的讨论,同时它也突出了Spring支持哪些模块。 33 | 34 | https://developer.okta.com/blog/2017/09/08/nosql-options-for-java-developers 35 | 36 | 8.JUnit 5.0.GA,JUnit和Spring Framework贡献者Sam Brannen刚刚更新了一个使用JUnit 5.0的实例程序。快看看吧! 37 | 38 | https://twitter.com/sam_brannen/status/906992590356205568 39 | 40 | 9.最后,JUnit 5现在在这里!在这个版本中有很多好东西,所以一定要查看发行说明! 41 | 42 | https://t.co/eQsLWvsL6d?ssr=true 43 | 44 | http://junit.org/junit5/docs/5.0.0/user-guide/#release-notes-5.0.0 45 | 46 | 10.Java平台首席架构师Mark Reinhold已经提出将Java移植到可预测,更频繁的发布周期。在这里链接阅读更多关于这个建议。 47 | 48 | https://t.co/onLM101gmk?ssr=true 49 | 50 | 11.我喜欢微软Azure星期五的安排,Sean McKenna向微软的传奇人物Scott Hanselman介绍了Cloud Foundry。 51 | 52 | https://t.co/JRPObzeRHO?ssr=true 53 | 54 | 55 | -------------------------------------------------------------------------------- /translated/20170919.md: -------------------------------------------------------------------------------- 1 | 嗨,亲爱的Spring粉丝们!欢迎来到本周Spring周报的另一期,这周我一直在访问微软的Spring和Cloud Foundry团队(这次在华盛顿州雷德蒙德市),然后到加利福尼亚州的旧金山和德克萨斯州的圣安东尼奥去访问一些客户。所以,让我们看看这周有什么新的内容! 2 | 3 | 4 | 1: 我喜欢这个Pivotal 工程师发表的一篇名为《我们如何将我们托管的Cloud Foundry的多租户安装Pivotal Web Services转移到CredHub》的文章。 CredHub旨在为BOSH管理的环境存储密码,密钥,证书和其他敏感信息。 5 | 6 | http://engineering.pivotal.io/post/credhub-on-pws/ 7 | 8 | 注意: 9 | BOSH 是一款供我们用来将 Cloud Foundry 组件部署到分布式节点上的工具。BOSH的详细介绍请参考链接:https://github.com/cloudfoundry-attic/cf-docs-cn/blob/master/content/deploy/bosh.md 10 | 11 | 2: Spring Boot大牛Brian Clozel刚刚发布了Spring Boot 1.5.7的更新,其中包括许多修复,依赖关系更新和改进。 12 | 13 | https://spring.io/blog/2017/09/12/spring-boot-1-5-7-available-now 14 | 15 | 3: Spring集成领导和消息大牛Gary Russell刚刚发布了Spring AMQP 2.0 RC1。自上一个里程碑以来,RC1增加了一些小的改进。加里还发布,现在也可以使用1.7.4和1.6.11的维护版本。 16 | 17 | https://spring.io/blog/2017/09/12/spring-amqp-2-0-release-candidate-1-7-4-and-1-6-11-are-available 18 | 19 | 4: 没有什么东西十全十美,加里也发布了Spring for Apache Kafka 2.0和1.3的候选版本。这两个版本都支持Kafka 0.11.x.x客户端,同时支持Spring Framework 4.3。新版本包括对Spring Framework事务同步的支持,KafkaAdmin对象以及AckMode.RECORD的正确处理。此外,这些版本还包括几个错误修复。 20 | 21 | https://spring.io/blog/2017/09/12/spring-for-apache-kafka-2-0-and-1-3-release-candidates-available 22 | 23 | 5: Spring Integration贡献者Artem Bilan刚刚发布了Spring Integration 5. M7和4.3.12。新版本将响应式Spring Webflux适配器提取到单独的模块中,spring-integration-webflux。它还支持在用于协议的消息的有效负载中编码消息头,例如AWS Kinesis,Apache Kafka的早期版本和TCP / IP - 不支持本机头部的概念。 24 | 25 | https://spring.io/blog/2017/09/14/spring-integration-5-0-milestone-7-and-4-3-12-available 26 | 27 | 6: Spring整合领导Gary Russell刚刚发布推出Spring Cloud Stream Ditmars / 1.3 RC1。新支持使用Kafka Streams KStream引用作为@StreamListener方法的输入和输出。换句话说,您可以使用Spring Cloud Stream连接应用程序,声明所有的绑定等等,就像平常一样,然后编写用于交互查询的Kafka Streams的消息代码。 28 | 29 | https://spring.io/blog/2017/09/14/spring-cloud-stream-ditmars-1-3-release-candidate-announcement 30 | 31 | 7: Spring Boot提交者StéphaneNicoll刚刚发布了Spring Boot 2.0.0.M4。此版本是第一个包含新的网络运行时无关的致动器端点以及一系列更改以简化安全配置。 32 | 33 | https://spring.io/blog/2017/09/15/spring-boot-2-0-0-m4-available-now 34 | 35 | 8: Spring Session 领导 Rob Winch刚刚发布了Spring Session 2.0.0.M4。此版本简化了基于Spring WebFlux的应用程序的配置。它还支持会话ID解析策略。 36 | 37 | https://spring.io/blog/2017/09/15/spring-session-2-0-0-m4 38 | 39 | 9: Spring大牛Greg Turnquist刚刚发布了Spring Session MongoDB 2.0.0.M3。新版本基于Spring Session 2.0.0.M4,Spring Data Kay RC3,Reactor Bismuth-M4和Spring Framework 5.0.0.RC4。如果你使用Spring Boot 2.0的spring-boot-starter-data-mongodb-reactive,那么你只需要使用@EnableMongoWebSession启用! 40 | 41 | https://spring.io/blog/2017/09/15/spring-session-mongodb-2-0-0-m3-released 42 | 43 | 10: Spring Security主管Rob Winch刚刚发布了Spring Security 5.0.0.M4。此版本新增了许多新功能,包括OAUth 2 / OpenID Connect支持和Spring WebFlux的响应集成。 44 | 45 | https://spring.io/blog/2017/09/15/spring-security-5-0-0-m4-released 46 | 47 | 11: Spring web 专家 Rossen Stoyanchev刚刚发布Spring Web Flow 2.4.6。该版本包含影响默认绑定的安全修补补丁。 48 | 49 | https://spring.io/blog/2017/09/15/spring-web-flow-2-4-6-released 50 | 51 | 12: Spring Cloud Data Flow贡献者Eric Bottard刚刚发布了Spring Shell 2.0.M1! Spring Shell项目表示一个命令组件模型,以支持开发自定义shell。 Spring Shell是支持Spring Cloud Data Flow shell的项目。这个新版本有很多提供,包括位置参数,使用Spring转换API,JLine 3支持,与bean验证API的集成,多行命令等等。 52 | 53 | https://spring.io/blog/2017/09/18/introducing-spring-shell-2-0m1 54 | 55 | 13: 西蒙·巴斯利刚刚发布了Reactor 3.1 RC1。这是迈向Spring Framework 5.0的一大步。强烈建议用户抓住这些机会,尽快尝试! 56 | 57 | https://spring.io/blog/2017/09/18/announcing-first-release-candidate-of-reactor-core-3-1 58 | 59 | 14: Spring Cloud Data Flow贡献者Glenn Renfro发布推出1.3.0.M2版本,包含了很多新功能。它包括支持批处理、任务和流操作的更新的Dashboard / Flo集成、 fan-in和 fan-out支持、应用程序注册表和Maven更新策略、安全更新、直接命名渠道、shell改进等等。 60 | 61 | https://spring.io/blog/2017/09/18/spring-cloud-data-flow-1-3-0-m2-released 62 | 63 | 15: Spring Boot大牛Madhura Bhave表示Spring Boot 2.0.0.M4改进了与Spring Security的集成方式;这绝对值得一读! 64 | 65 | https://spring.io/blog/2017/09/15/security-changes-in-spring-boot-2-0-m4 66 | 67 | 16:Tom Hombergs把Spring Boot和RabbitMQ应用在微服务消息方面做了一个很好的改进。 68 | 69 | https://reflectoring.io/event-messaging-with-spring-boot-and-rabbitmq/ 70 | 71 | 17:另一个友好的提醒,我会在以 Reactive Spring为主题 Reactive峰会上发表演讲,希望能在那里见到你! 72 | 73 | https://www.youtube.com/watch?v=GzebF1iKZPU 74 | 75 | 18:一个友好的提醒,我将在12月以Spring Boot和Kotlin为主题的Kotlin 大会上发表演讲,我很想在那里见到你。 76 | 77 | https://kotlinconf.com/speakers/#speaker=josh-long 78 | 79 | 19:Damith Ganegoda在这篇博文对Spring Boot和Angular 4做了很好的介绍。 80 | 81 | http://mydevgeek.com/angular-4-crud-application-with-spring-boot-rest-service-part-1/ 82 | 83 | 20:Ordina JWorks的博客非常详细的介绍了新的Micrometer monitoring abstraction(它也集成在Spring Boot 2.0.0.M4中)。 84 | 85 | https://ordina-jworks.github.io/microservices/2017/09/17/monitoring-your-microservices-with-micrometer.html 86 | 87 | 21:Atomist的Clay McCoy让你看到Atomist如何帮助您在Spring Boot应用程序中捕获REST API更改。 88 | 89 | https://the-composition.com/change-is-the-only-constant-in-a-rest-api-318baf92301f 90 | 91 | 22: 我喜欢这篇发布在ZDNet上的Greenplum的文章(大数据是最好的保密) 92 | 93 | http://www.zdnet.com/google-amp/article/pivotal-greenplum-is-alive-and-kicking/ 94 | 95 | 23:说到Spring Boot贡献者,以及令人赞叹的Madhura BHave,她还将对Spring Boot 2.0中的JavaZone 2017演示文稿进行了深入的介绍。 96 | 97 | https://speakerdeck.com/mbhave/a-sneak-peek-into-spring-boot-2-dot-0 98 | 99 | 24:我喜欢Dan的帖子,在这其中特别介绍了超媒体和HATEOAS的概念,并且使用了一些基于Spring Boot和Spring HATEOAS的示例代码。 100 | 101 | https://lankydanblog.com/2017/09/10/applying-hateoas-to-a-rest-api-with-spring-boot/amp/ 102 | 103 | 25:Facebook和Github刚刚发布推出了Atom IDE - 一个支持Java的新型IDE。我没有机会尝试,但它看起来很有趣。我不知道它是否会支持Maven或Gradle.. 104 | 105 | https://github.com/blog/2430-introducing-atom-ide 106 | 107 | -------------------------------------------------------------------------------- /translated/20170926.md: -------------------------------------------------------------------------------- 1 | 嗨,亲爱的Spring粉丝们!又是一个疯狂美妙的一周!我回到旧金山,与客户和当地合作伙伴谈论关于Pivotal相关的所有事情,同时在旧金山的阳光下享受玩Java 9的乐趣。我非常喜欢,并期待着这个新的版本,当然,Spring Framework 5是开箱即用的,它使用了Java 9。 2 | 3 | https://docs.oracle.com/javase/9/whatsnew/toc.htm#JSNEW-GUID-C23AFD78-C777-460B-8ACE-58BE5EA681F6 4 | 5 | 1: Spring IO平台领导Andy Wilkinson刚刚宣布了Spring IO Platform Brussels SR5。新版本包括Spring AMQP 1.7.4,Spring Boot 1.5.7,Spring Data Ingalls SR7,Spring Framework 4.3.11,Spring Integration 4.3.12,Spring Loaded 1.2.8和Spring Web Flow 2.4.6。在这个新版本中,很多东西是这样的,所以现在就开始吧! 6 | 7 | https://spring.io/blog/2017/09/19/spring-io-platform-brussels-sr5 8 | 9 | 2: Spring工具套件主管Martin Lippert刚刚发布了在MacOS High Sierra 10.13上运行STS时如何避免一些问题。 10 | 11 | https://spring.io/blog/2017/09/21/how-to-get-sts-eclipse-running-on-macos-high-sierra-10-13 12 | 13 | 3: Spring Cloud Task 的领导 Michael Minella刚刚宣布了Spring Cloud Task 1.2.2.RELEASE。新版本增加了对Spring Framework最近对使用MySQL的序列表的除MYISAM之外的数据库引擎的支持。 14 | 15 | https://spring.io/blog/2017/09/25/spring-cloud-task-1-2-2-release-is-now-available 16 | 17 | 4: 经典的Spring PetClinic多年来发生了很大变化!该版本演示了与Spring和Kotlin的PetClinic。如果你曾经看过任何一个原始的PetClinics(其中许多早于Spring本身!),你会觉得这是一个非常简洁的小应用程序, 18 | 19 | https://github.com/spring-petclinic/spring-petclinic-kotlin 20 | 21 | 5: 想了解Spring Boot的功能?这份分析报告可能是指南清单! 22 | 23 | https://content.pivotal.io/analyst-reports/spring-boot-simplifies-end-to-end-development?_lrsc=7c3f3dc7-c1fa-4e7b-863f-615b5abb2c52 24 | 25 | 6: Spring Cloud Pipelines 现在也支持Kubernetes 26 | 27 | http://cloud.spring.io/spring-cloud-pipelines/multi/multi_jenkins-pipeline-k8s.html#_connecting_to_a_kubo_cluster 28 | 29 | 7: Oracle发布Java 9!这是一个很大的事情!在Java 9中有很多好处。如果不使用Java 9,请尝试一下Spring Framework 5,Spring Framework 5在Java 9(模块和类路径)上运行,没有任何问题。 30 | 31 | https://www.infoq.com/news/2017/09/Java-9-release-sept-21 32 | 33 | 8: Twitter上的Alex Falappa发表:“下一个牛逼的SpringBoot插件:用于检测和修复丢失的pom依赖关系的java编辑器提示https://t.co/n7w22q4sMK” 34 | 35 | https://twitter.com/aless_falappa/status/912735050093010944 36 | 37 | 9: 最近有人询问有关在Cloud Foundry的Spring Boot应用程序中演示mTLS身份验证的示例。我不知道,所以 - 我经常这样做 - 我问Spring Security的主管Rob Winch,他分享了Java Cloud Foundry经验领导Ben Hale这个惊人的例子。很有意思! 38 | 39 | https://github.com/nebhale/mtls-sample 40 | 41 | 10: 我喜欢这个博客关于Pivotal领域的首席技术官Josh McKenty和他所在的云和云构建 42 | 43 | https://www.youtube.com/watch?v=OfwDTYeqHcI 44 | 45 | 11: 新的RebelLabs开发人员生产力报告已经出炉,并显示出Spring持续强劲增长。 Spring有众多用户,占46%,而Java EE则占33%。它也显示了Java 8的惊人增长,72%的用户使用它。哈哈,这两个好消息! 46 | 47 | https://zeroturnaround.com/rebellabs/developer-productivity-report-2017-why-do-you-use-java-tools-you-use/ 48 | 49 | 12: 新的Microsoft和新的Microsoft SQL Server 2017版本在这里,它运行在Linux上!我从来没有想过我会看到这一天。这与Spring有什么关系?绝对没有。只是..它真的很酷! 50 | 51 | https://arstechnica.com/gadgets/2017/09/microsoft-ignite-2017-azure-sql/?amp=1 52 | 53 | 13: 您在Spring Framework 5的功能Web框架中看到了7月份的活动中Spring大牛Arjen Poutsma的网络研讨会的成果? 54 | 55 | https://www.brighttalk.com/webcast/14893/263393?_lrsc=b02b5b66-1acb-44bc-8a09-1f23cdc47bf2 56 | 57 | 14: 说到响应式,你也可以欣赏Evgeny Poberezkin关于响应式编程演变的这个演讲。 58 | 59 | https://www.infoq.com/presentations/reactive-programming-evolution 60 | 61 | 15: Oracle有一个很好的选择了一些内容,引入了Java 9中的新功能。看看吧! 62 | 63 | https://www.oracle.com/java/java9-screencasts.html 64 | 65 | 16: Spring社区朋友迈克尔·西蒙斯(Michael Simons)介绍了Spring Boot的新版德语书籍。快去一探究竟! 66 | 67 | https://www.amazon.de/dp/3864905257/ref=cm_sw_r_tw_api_1.zXzbGMMWCEC 68 | 69 | 17: 最新版本的Camunda BPM系统具有Spring Boot集成功能。 70 | 71 | https://github.com/camunda/camunda-bpm-spring-boot-starter/ 72 | 73 | 18: .NET大牛Richard Seroter表示,Java和Spring Cloud用户对如下会觉得无趣:学习如何使用Pivotal的Steeltoe框架将断路器集成到.NET应用程序中。 74 | 75 | https://seroter.wordpress.com/2017/09/21/adding-circuit-breakers-to-your-net-applications/amp/ 76 | 77 | 19: 织机系统将Pivotal Cloud Foundry和Pivotal集装箱服务(基于Kubernetes)进行了环境化。 78 | 79 | https://www.loomsystems.com/blog/everything-you-need-to-know-about-pks-in-3-acts?_lrsc=ae2c4d5a-294e-4484-8ea8-e6beccfc4caa 80 | 81 | 20: Jenn Strater - 一个Spring REST文档的专家,除了许多其他内容之外,还汇集了一个介绍测试驱动文档的精彩演示文稿(根据Spring REST文档,natch)。 82 | 83 | https://speakerdeck.com/jlstrater/test-driven-docs-apiconf-de-2017 84 | 85 | 21: IBM最近发布了他们的J9 JVM。这篇文章让你对J9这个名字背后的独特历史有一点了解。 86 | 87 | https://medium.com/@rservant/how-did-the-j9-in-openj9-get-its-name-95a6416b4cb9?source=userActivityShare-a17df5ec14a4-1505939701 88 | 89 | 22: 这篇文章关于API文档的十个好主意与Spring并没有任何关系,但它似乎强调了这一点:Spring REST文档是一个好主意(TM)! 90 | 91 | https://alistapart.com/article/the-ten-essentials-for-good-api-documentation 92 | -------------------------------------------------------------------------------- /translated/20171003.md: -------------------------------------------------------------------------------- 1 | 欢迎收看新一期 《Spring 周报》!周报包含了上周的很多内容,可以了解非常多的干货。现在 Spring Framework 5.0 已推出!Spring Framework 5.0 同时也带来了许多发行版本,在本文中你会知道有哪些版本。另外,本周我(Josh Long)和其他来自Pivotal和Spring的团队成员,都会出席JavaOne大会,希望您能来我们的展位找我们或者和我们一起参与讨论。 2 | 3 | https://spring.io/blog/2017/09/28/pivotal-and-spring-team-at-javaone-2017 4 | 5 |

6 | 7 |

8 | 9 | 以下是关于周报的内容: 10 | 11 | 1. 上周,我研究了一下怎么使用 Spring Framwork5 来构建基于 websocket 的响应式应用: 12 | 13 | https://spring.io/blog/2017/09/27/spring-tips-reactive-websockets-with-spring-framework-5 14 | 15 |

16 | 17 |

18 | 19 | 2. Spring AMQP 和 Spring Integration 开发组领导 Gary Russell 宣布发布 Spring AMQP 2.0.RC2: 20 | 21 | https://spring.io/blog/2017/09/27/spring-amqp-2-0-release-candidate-2-available 22 | 23 |

24 | 25 |

26 | 27 | 3. 经过一段长的时间,Spring Framework 5.0.GA现在终于发布了!新版本集成了 Reactor 项目,包括响应式 web 运行时环境,Kotlin 扩展,以及全面基于 Java EE 7 和 Java 8。 28 | 新的发行版包含了太多的新东西,如果想要知道更多的消息,查看版本说明,然后查看更新内容: 29 | 30 | https://spring.io/blog/2017/09/28/spring-framework-5-0-goes-ga 31 | 32 | https://github.com/spring-projects/spring-framework/wiki/What's-New-in-the-Spring-Framework#whats-new-in-spring-framework-5x 33 | 34 |

35 | 36 |

37 | 38 |

39 | 40 |

41 | 42 | 43 | 4. Spring Reactor 团队成员 Simon Baslé 宣布发布 Spring 和 Reactor 集成的新版本Reactor Bismuth。这个版本为 Spring Framework 5.0 奠定了基础,它自己本身也包含了非常多的功能: 44 | 45 | https://spring.io/blog/2017/09/28/reactor-bismuth-is-out 46 | 47 |

48 | 49 |

50 | 51 | 5. Spring Framework 5.0 版本更新了一些其他的项目,其中包括发布了 Spring Data Kay。自从 Spring Data 于2009年成立以来,这是 Spring Data 更新的最大版本!该新版本以 Spring Framework 5.0 ,Java 8 和 Java EE 7 作为基准。它包括一个改进的仓储(repository) API(完整支持`Optional`),支持响应式数据访问(Cassandra,Couchbase,MongoDB和Redis),新发布版本新增 Spring Data Geode,使用非空注解并且优化了运行时检查空注解,通过 Kotlin 构造方法,支持 Kotlin 的 null安全和不可变数据类,支持兼容 Java 9,如果想了解更多请看 Spring Data Kay 文档: 52 | 53 | https://spring.io/blog/2017/10/02/spring-data-release-train-kay-goes-ga 54 | 55 |

56 | 57 |

58 | 59 | 6. Spring 消息中间件团队成员 Artem Bilan 宣布发布 Spring for Apache Kafka 2.0.GA。新版本包括支持 `Apache Kafka`,支持事务,消息头匹配,Apache Kafka 的`Streams` 支持,新的 `KafkaAdmin`,增加 `@KafkaListener` 和 `Consumer` 错误处理和群组支持的方案。它还支持使用 `@EmbeddedKafka` 进行测试: 60 | 61 | https://spring.io/blog/2017/10/02/spring-for-apache-kafka-2-0-ga-available 62 | 63 |

64 | 65 |

66 | 67 | 7. Spring Cloud 团队成员 Ryan Baxter 宣布发布 Spring Cloud Dalston SR4。新版本更新了 `Spring Cloud Contract`,`Spring Cloud Config`,`Spring Cloud Commons`,`Spring Cloud Netflix`和`Spring Cloud Sleuth`: 68 | 69 | https://spring.io/blog/2017/10/03/spring-cloud-dalston-sr4-is-now-available 70 | 71 |

72 | 73 |

74 | 75 | 8. Spring REST Docs 开发领导者 Andy Wilkinson 宣布发布 Spring REST Docs 1.2.2.RELEASE 。这个维护版本包括一些错误修复和文档的改进,推荐大家升级: 76 | 77 | https://spring.io/blog/2017/09/28/spring-rest-docs-1-2-2-release 78 | 79 |

80 | 81 |

82 | 83 | 9. 查看 Spring Framework 5 的全新的通过构造方法实现注解的实现: 84 | 85 | https://github.com/spring-projects/spring-framework/commit/23497a7ece7aac1591187b46f4b601d2f48764e0 86 | 87 |

88 | 89 |

90 | 91 | 10. 德语访谈中 Andreas Falk 提到的 Spring Framework 5.0 和 Spring Security 5.0 中的新功能: 92 | 93 | https://jaxenter.de/spring-security-interview-falk-62685 94 | 95 |

96 | 97 |

98 | 99 | 11. 由 Zoltan Altfatter 发表的这篇文章介绍了如何在 Spring Integration 流程中引入一个新的JMS消息来启动 Spring Batch 作业: 100 | 101 | http://blog.mimacom.com/blog/2017/09/29/trigger-a-spring-batch-job-with-a-jms-message/ 102 | 103 |

104 | 105 |

106 | 107 | 12. Rohit Kelapure: 为什么 Pivotal 公司的 Cloud Foundry 是运行 Spring Boot 应用程序的最佳选择? 108 | 109 | https://twitter.com/rkela/status/914924780373073920 110 | 111 |

112 | 113 |

114 | 115 | 13. 在这篇文章中,Cristina Negrean 介绍了如何使用 Spring Cloud Data Flow 进行实时分析: 116 | 117 | https://cristinanegrean.github.io/2017/10/01/spring-cloud-dataflow-for-real-time-analytics-with-twitter-api 118 | 119 |

120 | 121 |

122 | 123 | 14. Gabriela Motroc 在 JAXEnter 网上发布了一篇关于 Spring Framework 5 的新文章。非常多的功能都在文章包含了: 124 | 125 | https://jaxenter.com/spring-framework-5-0-137677.html 126 | 127 |

128 | 129 |

130 | 131 | 15. Aboullaite Mohammed:使用 Elasticsearch 和 Kibana 和 Spring Boot 集合来监控一些指标: 132 | 133 | https://aboullaite.me/spring-boot-elastic-kibana/ 134 | 135 |

136 | 137 |

138 | 139 | 16. Ordina JWorks:使用 Spring Cloud 来对微服务进行安全防护: 140 | 141 | https://ordina-jworks.github.io/microservices/2017/09/26/Secure-your-architecture-part1.html 142 | 143 |

144 | 145 |

146 | -------------------------------------------------------------------------------- /translated/20171010.md: -------------------------------------------------------------------------------- 1 | Hi , Spring 粉丝们!欢迎来到本周 Spring 周报时刻!非常凑巧的是,今天也是Ada Lovelace Day。根据“寻找Ada”网站解释:Ada Lovelace Day(ALD)是一个专门为庆祝女性在科学,技术,工程和数学(STEM)领域所取得的成就而设立的国际节日。它旨在分享 STEM 女性的事迹,树立更多的榜样,鼓励更多的女性进入 STEM 职业,并给那些已经在 STEM 工作的女性一些支持。来一起庆祝吧,Happy Ada Lovelace Day !(译注:STEM 由 Science, Technology, Engineering, Maths 取首字母得来) 2 | 3 | https://findingada.com/ 4 | 5 | ![](http://upload-images.jianshu.io/upload_images/5281821-5298a699ba57e09f?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 6 | 7 | 我刚参加完波兰弗罗茨瓦夫的 ByteMyCode 会议,现在就在华盛顿州西雅图与客户讨论,并且准备今天在西雅图举行了一场关于 Cloud Native Java 的开放日活动。今天晚些时候,我去加拿大多伦多访问客户,并出现在本周晚些时候发布的SpringOne平台预览展示。如果你在周围,不要犹豫,停下来,嗨! 8 | 9 | https://bytemycode.pl/![](http://upload-images.jianshu.io/upload_images/5281821-d535257347cd7e6f?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240)http://connect.pivotal.io/Survival-is-not-Mandatory-Seattle.html 10 | 11 | ![](http://upload-images.jianshu.io/upload_images/5281821-218e96daf77b9d77?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 12 | 13 | https://www.meetup.com/Toronto-Pivotal-User-Group/events/243155539/ 14 | 15 | ![](http://oxjys514c.bkt.clouddn.com/https://www.m) 16 | 17 | 1:  Spring Security主管Rob Winch刚刚宣布了Spring Security 5.0.0.M5。新版本包括错误修复和新功能。发布更新到Spring Framework 5.0.0.RELEASE,Reactor Bismuth-RELEASE和Spring Data Kay RELEASE。 18 | 19 | https://spring.io/blog/2017/10/10/spring-security-5-0-0-m5-released 20 | 21 | ![](http://upload-images.jianshu.io/upload_images/5281821-bfce32a1e28b3015?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 22 | 23 | 2:  Spring Security主管Rob Winch刚刚宣布了Spring Session 2.0.0.M5。新版本带来Redis ReactiveSessionRepository实现。 24 | 25 | https://spring.io/blog/2017/10/10/spring-session-2-0-0-m5-released 26 | 27 | ![](http://upload-images.jianshu.io/upload_images/5281821-bfce32a1e28b3015?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 28 | 29 | 3:  在上周的Spring Tips中,我看了响应式Spring Security 5。 30 | 31 | https://spring.io/blog/2017/10/04/spring-tips-reactive-spring-security 32 | 33 | ![](http://upload-images.jianshu.io/upload_images/5281821-bfce32a1e28b3015?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 34 | 35 | 4:  Spring集成大牛Artem Bilan刚刚宣布了Spring AMQP 2.0.0.RELEASE。这个新版本包括完整的Java 8和Spring Framework 5.0支持;一个新的spring-rabbit-junit神器与一些有用的测试工具,包括一个BrokerRunning JUnit @Rule;版本5.0的amqp-client库; DirectMessageListenerContainer允许直接在客户端线程上使用消息,而不是SimpleMessageListenerContainer中基于队列的逻辑;一个新的RabbitOperations.invoke()用于在专用的线程绑定通道上批量的模板操作; Logback AmqpAppender的编码器支持;大量的错误修复等等。看看发行吧! 36 | 37 | https://spring.io/blog/2017/10/05/spring-amqp-2-0-0-release-available 38 | 39 | ![](http://upload-images.jianshu.io/upload_images/5281821-bfce32a1e28b3015?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 40 | 41 | 5:  Spring Data 领导 John Blum刚刚宣布了Spring Session Data Geode / GemFire 2.0.0.M2。这个新版本升级到Spring Framework 5.0.0,Spring Data Kay RELEASE,Spring Session 2.0.0.M4,Spring Boot 2.0.0.M4,并增加了Pivotal GemFire和Apache Geode PDX Serialization支持。 42 | 43 | https://spring.io/blog/2017/10/06/spring-session-data-geode-gemfire-2-0-0-m2-available 44 | 45 | ![](http://upload-images.jianshu.io/upload_images/5281821-bfce32a1e28b3015?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 46 | 47 | 6:  Spring Cloud Vault主管Mark Paluch刚刚宣布了Spring Vault 1.1.0.GA和2.0.0.M3。新的1.1.0版本包括对AuthRole身份验证的拉模式支持,使用AWS IAM的Vault登录,批处理传输操作的支持,基于其租用持续时间轮换通用秘密,并引入VaultEndpointProvider动态配置端点。 2.0.M3包括基于Spring Data KeyValue之上的@EnableVaultRepositories注解的保管库,它包括创建和修改表示为JSON的Vault的策略的支持。 48 | 49 | https://spring.io/blog/2017/10/06/spring-vault-1-1-0-ga-and-2-0-0-m3-available 50 | 51 | ![](http://upload-images.jianshu.io/upload_images/5281821-bfce32a1e28b3015?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 52 | 53 | 7:  Spring Cloud大牛Vinicius Carvalho刚刚宣布了Spring Cloud Stream 1.3.0。新版本包括对Kafka Streams的支持,RabbitMQ的重试支持,懒惰队列(包括DLQ支持),滞后指标(了解为什么事情减缓)等等。查看这篇文章和在线YouTube视频了解更多! 54 | 55 | https://spring.io/blog/2017/10/06/spring-cloud-stream-1-3-goes-ga 56 | 57 | 58 | ![](http://upload-images.jianshu.io/upload_images/5281821-bfce32a1e28b3015?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 59 | 60 | 8:  Spring大牛Stephane Nicoll刚刚宣布了Spring Framework 4.3.12。这是一个维护版本,具有多项修复和选择的改进。 61 | 62 | https://spring.io/blog/2017/10/10/spring-framework-4-3-12-available-now 63 | 64 | ![](http://upload-images.jianshu.io/upload_images/5281821-bfce32a1e28b3015?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 65 | 66 | 9:  我喜欢Dave Syer博士在OpenSlava 2017展会上谈论road to serverless。这是Spring Cloud Function中的概念(和代码),很有趣。 67 | 68 | https://www.youtube.com/watch?v=I2Yu3YoC-mw 69 | 70 | ![](http://upload-images.jianshu.io/upload_images/5281821-0a5b5895a34acc1d.y?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 71 | 72 | 10:  Baeldung更新了与Netflix Hystrix熔断器的Spring Cloud集成的覆盖面。 73 | 74 | http://www.baeldung.com/spring-cloud-netflix-hystrix 75 | 76 | ![](http://upload-images.jianshu.io/upload_images/5281821-1388b2f60881134f.ba?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 77 | 78 | 11:  看到RedHat拥抱Spring Boots真的很酷,但是使用Kubernetes ConfigMaps来管理密码(如密码或证书)的这篇文章忽略了更强大的功能(更不用说平台无关)Spring Cloud Config Server。 79 | 80 | https://developers.redhat.com/blog/2017/10/04/configuring-spring-boot-kubernetes-secrets/ 81 | 82 | ![](http://upload-images.jianshu.io/upload_images/5281821-d2aa13f5a6afdce7?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 83 | 84 | https://cloud.spring.io 85 | 86 | ![](http://upload-images.jianshu.io/upload_images/5281821-09e58478561eba14?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 87 | 88 | https://github.com/spring-cloud-samples/configserver 89 | 90 | ![](http://upload-images.jianshu.io/upload_images/5281821-1a739c2083b7d9ed?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 91 | 92 | 12:  我喜欢这个MemoryNotFound博客文章,使用Spring Boot与ActiveMQ(或一般只是JMS)。 93 | 94 | http://memorynotfound.com/spring-boot-activemq-queue-point-point-configuration-example/ 95 | 96 | ![](http://upload-images.jianshu.io/upload_images/5281821-1543452cd43db342?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 97 | 98 | 13:  Sebastien Deleuze刚刚更新了与KotlinX Coroutines与Project Reactor集成项目。 99 | 100 | https://github.com/sdeleuze/reactor-kotlin-jdbc/ 101 | 102 | ![](http://upload-images.jianshu.io/upload_images/5281821-1a739c2083b7d9ed?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 103 | 104 | 14:  我喜欢这个采用Spring Boot和Kotlin版本的著名PetClinic示例 105 | 106 | https://t.co/WkdaeR4Wtt?ssr=true 107 | 108 | ![](http://upload-images.jianshu.io/upload_images/5281821-35787c2eb4ff7825.co?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 109 | 110 | 15:  Reactor的KotlinX协同程序支持 - 这是支持Spring Framework 5的Spring WebFlux本身的活动库 - 已更新为Reactor Bismuth先行列车。 111 | 112 | https://github.com/Kotlin/kotlinx.coroutines/commit/ac8b6da408a61b5617428069b3f13c2fdf8f9951 113 | 114 | ![](http://upload-images.jianshu.io/upload_images/5281821-1a739c2083b7d9ed?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 115 | 116 | 16:  我真的很喜欢斯蒂芬·扬森(Stephen Janssen),看看Java 9或更高版本的发展。 117 | 118 | https://t.co/xLfRVlqOAf?ssr=true 119 | 120 | ![](http://upload-images.jianshu.io/upload_images/5281821-35787c2eb4ff7825.co?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 121 | 122 | 17:  NewStack在这篇文章中讨论了Spring Framework 5中的响应式性支持 123 | 124 | https://thenewstack.io/spring-framework-5-supports-reactive-programming/?_lrsc=bc96c10d-7cfc-4f6f-9fb8-d65eef8a3b86 125 | 126 | ![](http://upload-images.jianshu.io/upload_images/5281821-3854f6653e8666b7?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 127 | 128 | 18:  Alex Nesterov发现可以使用Kotlinx协议扩展,基于响应式Spring Framework 5的代码。这是一个有趣的工作。 129 | 130 | http://blog.alexnesterov.com/post/kotlin-coroutines-in-spring/ 131 | 132 | ![](http://oxjys514c.bkt.clouddn.com/http://blog.a) 133 | 134 | 19:  新版本的Activiti 7(一个开放源码BPMN工作流引擎)配置有一个Maven,还有Spring Boot / Spring Cloud-ready启动器和集成,看起来很棒。 135 | 136 | https://github.com/Activiti/Activiti/wiki/Activiti-7-Roadmap 137 | 138 | ![](http://upload-images.jianshu.io/upload_images/5281821-1a739c2083b7d9ed?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 139 | 140 | 20:  Java在2017年 - JetBrains的开发者生态系统状态 141 | 142 | http://www.jetbrains.com/research/devecosystem-2017/java/ 143 | 144 | ![](http://upload-images.jianshu.io/upload_images/5281821-c6bbda041f43c864.je?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 145 | 146 | 21:  Ham Vocke在测试微服务时候发表了一个非常好的帖子。我很喜欢这篇文章,虽然我将使用Spring Cloud Contract而不是Pact。 Spring Cloud Contract也可以支持Pact文件。 147 | 148 | http://www.hamvocke.com/blog/testing-java-microservices/ 149 | 150 | ![](http://upload-images.jianshu.io/upload_images/5281821-4ee4316048bf253e.ha?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 151 | 152 | 22:  在Ordina JWorks博客的这个令人惊讶的帖子中,Dieter Hubau帮助Rick(来自Rick&Morty)惊人的将麦当劳木兰四川酱与Spring Cloud Stream连接起来。 153 | 154 | https://ordina-jworks.github.io/spring/2017/10/04/Spring-Cloud-Stream-Rick-And-Morty-Adventure.html 155 | 156 | ![](http://upload-images.jianshu.io/upload_images/5281821-353b20c95459d6d5?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) 157 | 158 | 23:  Thymeleaf领导Daniel Fernandez刚刚宣布,Thymeleaf 3.0.8已经发布!在这个版本中有很多新功能, 但我最喜欢的是Spring 5集成模块,thymeleaf-spring5的GA版本,这使得Thymeleaf在响应式的潮流中显得非常容易使用。 159 | 160 | http://forum.thymeleaf.org/Thymeleaf-3-0-8-JUST-PUBLISHED-td4030687.html 161 | 162 | ![](http://upload-images.jianshu.io/upload_images/5281821-e955e52a1a71acb0?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240) -------------------------------------------------------------------------------- /translated/20171017.md: -------------------------------------------------------------------------------- 1 | Hi,Spring 粉丝们!欢迎来到本周的Spring 周报时间!本周,我一直在德克萨斯州的达拉斯和奥斯汀,首先进行客户会议,然后出席了非常有影响力的 Reactive 峰会。如果你也在附近,欢迎在Twitter上跟我联系!我们还有很多事情想告诉你,让我们开始吧: 2 | 3 | 4 | 5 | https://www.reactivesummit.org/ 6 | 7 | ![img](http://oxjys514c.bkt.clouddn.com/https://www.r) 8 | 9 | https://twitter.com/starbuxman 10 | 11 | ![img](http://oxjys514c.bkt.clouddn.com/https://twitt) 12 | 13 | 另外,我和Grails 联合创始人 Jeff Scott Brown 正准备在2017年11月9日开展 OCI 的网络研讨会,会议主题是“Grails for the Spring Developer”。希望你能加入! 14 | 15 | https://objectcomputing.com/products/grails/webinar-grails-3-spring-developers/ 16 | 17 | ![img](http://oxjys514c.bkt.clouddn.com/https://objec) 18 | 19 | 20 | 1: 上周,SpringSource 联合创始人和 Spring Framework 的开发领导人 Juergen Hoeller 获得了 “JAX Special Jury” 奖,奖励他从 Spring 项目开始到现在为该项目作出的大量努力和工作。特别评委会指出:“Spring 框架从发布开始到现在,这些年从来不需要将它完全重写。并且,它还在不断适应着各种趋势的变化。“ 谢谢你 ,Juergen,感谢你所做的一切。 21 | 22 | https://spring.io/blog/2017/10/10/spring-co-founder-and-spring-framework-lead-juergen-hoeller-wins-jax-special-jury-award 23 | 24 | ![img](http://oxjys514c.bkt.clouddn.com/https://sprin) 25 | 26 | 2: 上周,我研究了如何使用Scala基于 Reactive Spring Boot 来创建和运行Spring Webflix 应用程序,以及如何与其他符合Reactive Streams的项目(如Akka Streams)进行交互操作。 27 | 28 | https://spring.io/blog/2017/10/11/spring-tips-bootiful-reactive-scala 29 | 30 | ![img](http://oxjys514c.bkt.clouddn.com/https://sprin) 31 | 32 | 3: Spring Data 开发领导人 Oliver Gierke 刚刚发布了Spring Data Ingalls SR8。此版本包含一系列优化改进和bug修复,推荐升级使用Ingalls发行版本。 33 | 34 | https://spring.io/blog/2017/10/11/spring-data-ingalls-sr8-released 35 | 36 | ![img](http://oxjys514c.bkt.clouddn.com/https://sprin) 37 | 38 | 4: Spring Boot 开发领导人 Phil Webb 刚刚发布了Spring Boot 2.0.0.M5 版本。新版本现在可以在 Spring Initializr 上体验了。它包括对Java 9 的初步支持,Spring Security 5.0 的 OAuth2 客户端,JSON-B 的支持以及新的Spring Session Actuator 终端。 39 | 40 | https://spring.io/blog/2017/10/12/spring-boot-2-0-0-m5-available-now 41 | 42 | ![img](http://oxjys514c.bkt.clouddn.com/https://sprin) 43 | 44 | https://start.spring.io 45 | 46 | ![img](http://oxjys514c.bkt.clouddn.com/https://start) 47 | 48 | 5: Spring Tool Suite 主管 Martin Lippert 刚刚发布了Spring Tool Suite 3.9.1 版本。 新版本更新到了 Eclipse Oxygen 1.a,更新包括支持 JDK 9 和 JUnit 5 ,更新了Spring Boot Dashboard 以支持观察正在运行在 Spring Boot 中的 bean。最后一件非常cool的事!新版本可以将 application.properties 重构转换为 application.yml,当然新版本也修复了一些bug和增加了一些改进。 49 | 50 | https://spring.io/blog/2017/10/12/spring-tool-suite-3-9-1-released 51 | 52 | ![img](http://oxjys514c.bkt.clouddn.com/https://sprin) 53 | 54 | 6: Spring 大师 StéphaneNicoll 刚刚发布了 Spring Boot 1.5.8 版本。新版本包括40多个问题修复,新增的改进和依赖关系的更新。这是一个值得推荐更新的版本。 55 | 56 | https://spring.io/blog/2017/10/17/spring-boot-1-5-8-available-now 57 | 58 | ![img](http://oxjys514c.bkt.clouddn.com/https://sprin) 59 | 60 | 7: Spring Web Services 主管 Greg Turnquist 刚刚发布了 Spring WS 2.4.1 和 3.0.0.RC1。 2.4.1有一些小的调整,3.0.0.RC1有很多主要的升级。 Java 8 和 Spring Framework 5.0 作为新版本的基础。如果您正在构建基于 SOAP 的服务,那这些就是为您准备的! 61 | 62 | https://spring.io/blog/2017/10/17/spring-web-services-2-4-1-release-3-0-0-rc1-released 63 | 64 | ![img](http://oxjys514c.bkt.clouddn.com/https://sprin) 65 | 66 | 8: 您是否知道 Google Cloud Platform 上新的 Spring Cloud 集成 ?他们有很多相似的东西:包括核心 GCP 功能,如项目ID,Runtime Config API,Google Cloud Pub / Sub,Google Cloud SQL,Google Cloud Storage,Spring Cloud Sleuth 与 Google Stackdriver 功能的集成! 67 | 68 | https://cloud.spring.io/spring-cloud-gcp/ 69 | 70 | ![img](http://oxjys514c.bkt.clouddn.com/https://cloud) 71 | 72 | 9: Spring Data 主管Oliver Gierke在这个播客中进行了一次非常好的从单个个体到整个系统的演讲。绝对值得一听! 73 | 74 | https://content.pivotal.io/podcasts/from-monolith-to-a-system-of-systems-ep-46?mkt_tok=eyJpIjoiTmpNMlpURmxPR0ZqWm1ZeCIsInQiOiJVWllnQzRDSG1XRFFqb3JaUzZSN0VHNnMyUEJpTzZXbXhOSlwvRVNESWRuOGJKdGhTTnlCSkVUdjRYaFo2ZWJcL3pRSGVKaUNoZWdGaHRsXC92WFIwRHZwZFJ5aFp1SUllQmFpVTVaa05KMCtKbEQ3UThnUDB5dTdJa3JcL3FKaVFQZzgifQ%253D%253D 75 | 76 | ![img](http://oxjys514c.bkt.clouddn.com/https://conte) 77 | 78 | 10: Judy Wang 更深入的研究了Pivotal Cloud Foundry的“PCF指标”是如何减少平均时间恢复的 79 | 80 | https://content.pivotal.io/blog/how-pcf-metrics-helps-you-reduce-mttr-for-spring-boot-apps-and-save-money-too?_lrsc=11ca73a3-c08a-4131-86af-9743179a2b51 81 | 82 | ![img](http://oxjys514c.bkt.clouddn.com/https://conte) 83 | 84 | 11: Spring Framework 的创始人和 Atomist 的CEO Rod Johnson 在这篇有趣的博客文章中介绍了Atomist对自动化开发的一些观点。 Atomist 提供了一些可能对 Spring 开发人员非常有用的工具。 85 | 86 | https://the-composition.com/if-you-care-about-it-automate-it-with-atomist-20eccb8a28 87 | 88 | ![img](http://oxjys514c.bkt.clouddn.com/https://the-c) 89 | 90 | 12: 在Kenny Bastani 应用程序示例中,我们使用事件驱动架构和各种基于Spring的技术 91 | 92 | https://github.com/kbastani/event-stream-processing-microservices#packaging 93 | 94 | ![img](http://oxjys514c.bkt.clouddn.com/https://githu) 95 | 96 | 13: 我喜欢 VedranPavić 的演讲:《从零到开源英雄:为 Spring 项目做的贡献》 97 | 98 | https://speakerdeck.com/vpavic/from-zero-to-open-source-hero-contributing-to-spring-projects-2 99 | 100 | ![img](http://oxjys514c.bkt.clouddn.com/https://speak) 101 | 102 | 14: Spring框架创始人和Atomist CEO Rod Johnson在这篇博文中展开讲述了 Atomist 发展自动化开发。这是开发者的火箭炮。 103 | 104 | https://the-composition.com/if-you-care-about-it-automate-it-with-atomist-20eccb8a28?source=userActivityShare-a17df5ec14a4-1508101154 105 | 106 | ![img](http://oxjys514c.bkt.clouddn.com/https://the-c) 107 | 108 | 15: 我和JetBrains的工程师开展了一次关于Reactive Spring的网上交流会。该会现在在这里提供。网上交流会介绍了Reactor,Spring Framework 5.0(和Spring WebFlux),Spring Data Kay,Spring Boot 2.0(和Actuator),Spring Security 5.0 和 WebClient,这些全部是Kotlin语言!我希望你喜欢。 109 | 110 | https://blog.jetbrains.com/idea/2017/10/reactive-spring/?mail=event 111 | 112 | ![img](http://oxjys514c.bkt.clouddn.com/https://blog.) 113 | 114 | 16: 我以为很酷的一个Pivotal商业广告! 115 | 116 | https://www.ispot.tv/ad/A9Fp/dell-technologies-magic-with-ge-featuring-jeffrey-wright 117 | 118 | ![img](http://oxjys514c.bkt.clouddn.com/https://www.i) 119 | 120 | 17: Spring 测试大师 Sam Brannen 汇总了一个关于如何编写Junit5 Jupiterkuo扩展来代替Junit4 编程模式中的@runle 的例子。 121 | 122 | https://github.com/sbrannen/junit5-demo/blob/master/src/test/java/extensions/CaptureSystemOutput.java 123 | 124 | ![img](http://oxjys514c.bkt.clouddn.com/https://githu) 125 | 126 | 18: Redmonk公司(注:专注于软件开发行业分析的公司) 的 James Governor 对Oracle 在上周OracleOpenWorld 大会上公开宣布已经停止维护的Hudson,以及现在更加流行的这类技术像 Jenkins 和正在发展中的新星 Pivotal's Concourse的一篇研究文章 127 | 128 | https://redmonk.com/jgovernor/2017/10/12/oh-hai-jenkins-oh-bye-hudson-lets-keep-an-eye-on-concourse/ 129 | 130 | ![img](http://oxjys514c.bkt.clouddn.com/https://redmo) 131 | 132 | 19: 此外,Redmonk公司的James Governor 关于Cloud Foundry峰会的一些消息回顾,其中包括由Pivotal Cloud Foundry公司基于Kubernetes 实现的Kubo的详细内容。 133 | 134 | https://redmonk.com/jgovernor/2017/10/11/some-thoughts-on-cloud-foundry-summit/ 135 | 136 | ![img](http://oxjys514c.bkt.clouddn.com/https://redmo) 137 | 138 | 20: 这是来自Hortonworks的Tim Spann的老兄,如何创建一个Spring Boot微服务来阅读Apache Phoenix Data。 139 | 140 | https://community.hortonworks.com/content/kbentry/56642/creating-a-spring-boot-java-8-microservice-to-read.html 141 | 142 | ![img](http://oxjys514c.bkt.clouddn.com/https://commu) 143 | 144 | 21: TechCrunch还综合了最近的Cloud Foundry Summit新闻,重点介绍了Kubernetes将容器集成到Cloud Foundry中。这是理想的状态服务,如Elasticsearch。 145 | 146 | https://techcrunch.com/2017/10/11/cloud-foundry-launches-its-online-marketplace-and-adds-native-kubernetes-support/amp/ 147 | 148 | ![img](http://oxjys514c.bkt.clouddn.com/https://techc) 149 | 150 | 22: JAXEnter网站的Jane Elizabeth非常看好最近发布的Spring Data Kay (响应式Spring Data 实现)。 151 | 152 | https://jaxenter.com/spring-data-kay-137782.html 153 | 154 | ![img](http://oxjys514c.bkt.clouddn.com/https://jaxen) 155 | 156 | 23: JAX创新奖刚刚开始,特别高兴的是我们看到Spring Framework的主管Juergen Hoeller赢得了JAX特别评委会奖(JAX Special Jury Award)。Spring是最大并且一直在持续维护的项目之一,Java社区中没有其他人做了这么多的工作并且维护源码库这么长的时间。感谢Juergen,代码库不需要一次完全重写。如颁奖感言中说的一样,“谢谢Jürgen为Spring Framework做的一切!” 157 | 158 | https://jaxenter.com/winners-jax-innovation-awards-2017-137993.html 159 | 160 | ![img](http://oxjys514c.bkt.clouddn.com/https://jaxen) -------------------------------------------------------------------------------- /translated/20171024.md: -------------------------------------------------------------------------------- 1 | Hi,Spring 粉丝们!欢迎来到本周的 Spring 周报时间!真不敢相信,2017年的10月就快要结束了?光阴如箭,时光飞逝啊!本周我在阳光明媚的旧金山与客户讨论,并且举办一些讲座。 2 | 3 | 4 | 我将在“vJUG 24”在线会议上发言。会议将持续24小时!每一小时都有不同的主题内容,尽可能的让不同时区的人都能看到!周三,在04:00 GMT 的时候会举办Reactive Spring,希望你能加入我们当中。 5 | 6 | ![img](http://oxjys514c.bkt.clouddn.com/_URL_) 7 | 8 | 9 | 当然,我希望你可以在2017年11月9日注册并加入我朋友 Jeff Scott Brown (Grails的联合创始人)和我一起举办的Grails for Spring Developers。 10 | 11 | https://objectcomputing.com/products/grails/webinar-grails-3-spring-developers/ 12 | 13 | ![img](http://oxjys514c.bkt.clouddn.com/https://objectcomputing.com/products/grails/webinar-grails-3-spring-developers/) 14 | 15 | 16 | 1: 在上周 Spring Tips 中,通过参考 Jersey 操作手册,我介绍了如何在Spring Boot 2.0应用程序上下文中使用JAX-RS。 17 | 18 | https://spring.io/blog/2017/10/18/spring-tips-bootiful-jax-rs 19 | 20 | ![img](http://oxjys514c.bkt.clouddn.com/https://spring.io/blog/2017/10/18/spring-tips-bootiful-jax-rs) 21 | 22 | 2: Spring Integration 团队成员 Artem Bilan 刚刚发布了针对 AWS 1.1 RC1 的 Spring Integration。新版本包括 KinesisMessageDrivenChannelAdapter ,DynamoDbMetaDataStore,还有 Spring Cloud Stream Kinesis Binder 等等。如果想知道详情的话,点击网址: 23 | 24 | https://spring.io/blog/2017/10/19/spring-integration-for-aws-1-1-release-candidate-1-available 25 | 26 | ![img](http://oxjys514c.bkt.clouddn.com/https://spring.io/blog/2017/10/19/spring-integration-for-aws-1-1-release-candidate-1-available) 27 | 28 | 3: Spring Boot 1.x 不支持Java 9。 Spring Boot 2.0将会最晚在12月支持Java 9。也就是说,如果你想在 Spring Boot 1.x 上使用 Java 9,可以看看下面这个 wiki 页面: 29 | 30 | https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-with-Java-9 31 | 32 | ![img](http://oxjys514c.bkt.clouddn.com/https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-with-Java-9) 33 | 34 | 4: Richard Seroter 教你通过5种方式购买软件来打造成软件公司,效率非常高。 35 | 36 | https://content.pivotal.io/blog/velocity-as-a-service-5-ways-to-ship-like-a-software-company 37 | 38 | ![img](http://oxjys514c.bkt.clouddn.com/https://content.pivotal.io/blog/velocity-as-a-service-5-ways-to-ship-like-a-software-company) 39 | 40 | 5: 我喜欢这个Spring框架中的 issue ,其中 Thymeleaf 开源者 Daniel Fernandez 对在 Spring WebFlux 的应用程序中如何使用 Thymeleaf 提出了很多建议。 41 | 42 | https://jira.spring.io/browse/SPR-14981 43 | 44 | ![img](http://oxjys514c.bkt.clouddn.com/https://jira.spring.io/browse/SPR-14981) 45 | 46 | 6: 您现在可以根据需要在 Pivotal Cloud Foundry 上使用 cf create-serivice 创建 RabbitMQ 集群,快来尝试! 47 | 48 | https://content.pivotal.io/home-page/demand-your-on-demand-rabbitmq-clusters-now 49 | 50 | ![img](http://oxjys514c.bkt.clouddn.com/https://content.pivotal.io/home-page/demand-your-on-demand-rabbitmq-clusters-now) 51 | 52 | 7: Andreas Falk 深入的了解在 Cloud Foundry 上通过如何通过Spring Cloud Vault 来管理重要信息和其他。 53 | 54 | https://www.youtube.com/watch?v=QlyslxoTCUA 55 | 56 | ![img](http://oxjys514c.bkt.clouddn.com/https://www.youtube.com/watch?v=QlyslxoTCUA) 57 | 58 | 8: Randhir Randhir Singh 总结将多个Spring Boot 应用集成起来构建一个 Spring Cloud Data Flow 来进行实时数据集成和数据流处理。 59 | 60 | https://dzone.com/articles/building-data-pipelines-with-spring-cloud-data-flo 61 | 62 | ![img](http://oxjys514c.bkt.clouddn.com/https://dzone.com/articles/building-data-pipelines-with-spring-cloud-data-flo) 63 | 64 | 9: 我喜欢 Biju Kunjummen 的名为 《All and Sundry》的博客,详细的比较了Spring Boot 1.0与Spring Boot 2.0,当然它是基于 Spring WebFlux 和 Reactor Project。剧透一点点,文章里面包括了异步,非阻塞IO,在 SLA 级别的支持。 65 | 66 | http://www.java-allandsundry.com/2017/10/raw-performance-numbers-spring-boot-2.html?m=1 67 | 68 | ![img](http://oxjys514c.bkt.clouddn.com/http://www.java-allandsundry.com/2017/10/raw-performance-numbers-spring-boot-2.html?m=1) 69 | 70 | 10: 好的,首先:这只不过是一个早期的原型版本!但是,Vinicius Carvalho 已经将Spring和RSocket的集成在一起。 RSocket是一个在“Reactive Stream”类型之上的高性能协议。它有来自Facebook,Netflix和AEron项目的高级工程师等人的贡献。所有这一切,这真的是令人兴奋的!但是它还只是一个早期版本(我有提到吗?),所以我相信 Vinicius 会感谢你的任何反馈。 71 | 72 | https://github.com/viniciusccarvalho/spring-cloud-sockets 73 | 74 | ![img](http://oxjys514c.bkt.clouddn.com/https://github.com/viniciusccarvalho/spring-cloud-sockets) 75 | 76 | 11: 这是 Spring 框架很棒的例子。Kotlin团队成员 SébastienDeleuze 展示了如何在应用程序的前端和后端使用Kotlin。前端使用Kotlin2JS,后端使用Kotlin 当然也是用的Spring Boot。 77 | 78 | https://github.com/sdeleuze/spring-kotlin-fullstack 79 | 80 | ![img](http://oxjys514c.bkt.clouddn.com/https://github.com/sdeleuze/spring-kotlin-fullstack) 81 | 82 | 12: 我还没有看过,但它一定非常有趣:Ravi Kant Soni 写了一本关于使用Spring Boot构建Angular应用程序的书。欢迎深入体验: 83 | 84 | https://www.amazon.com/Full-Stack-AngularJS-Java-Developers/dp/148423197X/ref=redir_mobile_desktop/131-1572141-3987769?_encoding=UTF8&dpID=51XPtAmfcFL&dpPl=1&keywords=ravi%20kant%20soni&pi=AC_SX236_SY340_FMwebp_QL65&qid=1508328122&ref=plSrch&ref_=mp_s_a_1_1&sr=8-1 85 | 86 | ![img](http://oxjys514c.bkt.clouddn.com/https://www.amazon.com/Full-Stack-AngularJS-Java-Developers/dp/148423197X/ref=redir_mobile_desktop/131-1572141-3987769?_encoding=UTF8&dpID=51XPtAmfcFL&dpPl=1&keywords=ravi%20kant%20soni&pi=AC_SX236_SY340_FMwebp_QL65&qid=1508328122&ref=plSrch&ref_=mp_s_a_1_1&sr=8-1) 87 | -------------------------------------------------------------------------------- /translated/20171108.md: -------------------------------------------------------------------------------- 1 | Hi ,Spring 粉丝们!非常高兴你能阅读这周的 Spring 周报!这周我们将在比利时 · 安特卫普举办了Devoxx(比利时)大会。我与 Matt Raible 和 Mark Heckler 都会出席并且会介绍 Progressive Web 应用程序和 Reactive Spring。Pivotal 公司的部分 Spring 团队成员也会出席大会,如果你能安排好时间,那么就来参加吧。 2 | 3 | 4 | 这周,我也会和 Grails 的联合创始人 Jeff Scott Brown 一起合作举办网上交流会,交流会主题为:Grails for Spring Boot Developer。 5 | 6 | https://objectcomputing.com/products/grails/webinar-grails-3-spring-developers/ 7 | 8 | ![img](http://oxjys514c.bkt.clouddn.com/https://objectcomputing.com/products/grails/webinar-grails-3-spring-developers/) 9 | 10 | 11 | 之后还有在摩洛哥 · 卡萨布兰卡还会举办一场 Devoxx MA 活动。 12 | 13 | 14 | 如果你能参加任何一个活动,不要犹豫,来和我们一起讨论吧! 15 | 16 | https://twitter.com/starbuxman 17 | 18 | ![img](http://oxjys514c.bkt.clouddn.com/https://twitter.com/starbuxman) 19 | 20 | 21 | 1: Spring Cloud Pipelines 负责人 Marcin Grzejszczak 刚刚宣布 Spring Cloud Pipelines 1.0.0.M7 版本正式发布。这个新版本新增了 Kubernetes 对 Jenkins 和 Concourse 的支持。除此之外,它还拥有超过 150 个 Bash 测试来提升更多的代码覆盖。 22 | 23 | https://spring.io/blog/2017/10/31/spring-cloud-pipelines-1-0-0-m7-released 24 | 25 | ![img](http://oxjys514c.bkt.clouddn.com/https://spring.io/blog/2017/10/31/spring-cloud-pipelines-1-0-0-m7-released) 26 | 27 | 2: Spring Cloud 联席负责人 Spencer Gibb 刚刚宣布 Spring Cloud Finchley M3 版本正式发布。 Spring Cloud Finchley 在 Spring Framework 5 中集成了响应式 API ,并引入了一个名为 Spring Cloud Gateway 的新项目。 28 | 29 | https://spring.io/blog/2017/10/31/spring-cloud-finchley-m3-released 30 | 31 | ![img](http://oxjys514c.bkt.clouddn.com/https://spring.io/blog/2017/10/31/spring-cloud-finchley-m3-released) 32 | 33 | 3: Spring Security 负责人 Rob Winch 刚刚宣布 Spring Security 5.0.0.RC1 版本正式发布。这个版本有非常大的改变,所以你一定要在升级前,仔细检查新版本是否适合现有的代码。新版本中集成了 Spring Web Flux 和 Spring Framework 5,OAuth 2.0 (直接使用 Spring Security !),密码存储更新,UnboundID LDAP 内存支持等等。 34 | 35 | https://spring.io/blog/2017/11/01/spring-security-5-0-0-rc1-released 36 | 37 | ![img](http://oxjys514c.bkt.clouddn.com/https://spring.io/blog/2017/11/01/spring-security-5-0-0-rc1-released) 38 | 39 | 4: Spring Security 和 Spring Session 负责人 Rob Winch 刚刚宣布 Spring Session 2.0.0.RC1 版本正式发布。新版本简化了与 Servlet API 的集成,以及增加了使用 cron 进程对 Redis 会话进行清理,同时也对即将到来的 2.0.0.RELEASE 版本进行了最后的优化。 40 | 41 | https://spring.io/blog/2017/11/01/spring-session-2-0-0-rc1-released 42 | 43 | ![img](http://oxjys514c.bkt.clouddn.com/https://spring.io/blog/2017/11/01/spring-session-2-0-0-rc1-released) 44 | 45 | 5: Spring Integration 开发大咖 Artem Bilan 刚刚宣布 Spring Integration 5.0 RC1 版本正式发布。新版本包括许多内容,其中包括 20 个 issues 修复,基于 HTTP WebFlux 的适配器,以及修改了 Java DSL 以支持为在 DSL 中创建的每个组件注册新的 bean 定义。 46 | 47 | https://spring.io/blog/2017/11/01/spring-integration-5-0-release-candidate-1-available 48 | 49 | ![img](http://oxjys514c.bkt.clouddn.com/https://spring.io/blog/2017/11/01/spring-integration-5-0-release-candidate-1-available) 50 | 51 | 6: Spring Batch 负责人 Michael Minella 刚刚宣布 Spring Batch 4.0.0.RC1 版本正式发布,其中包括更新的基础 API ,新的构建器 API ,更新的 Java 配置和文档。总而言之,它是一个值得升级的版本。使用 Spring Boot 的人都应该来尝试使用下新版本。 52 | 53 | https://spring.io/blog/2017/11/02/spring-batch-4-0-0-rc1-is-now-available 54 | 55 | ![img](http://oxjys514c.bkt.clouddn.com/https://spring.io/blog/2017/11/02/spring-batch-4-0-0-rc1-is-now-available) 56 | 57 | 7: Spring Boot 开发大咖 StéphaneNicoll 刚刚宣布 Spring Boot 2.0.0.M6 版本正式发布,它开始初步支持 HTTP/2 ,改进了对基于 WebFlux 的应用的支持(增加了 TLS 配置和错误页面),另外还有第一次和 Kotlin 集成。 58 | 59 | https://spring.io/blog/2017/11/06/spring-boot-2-0-0-m6-available-now 60 | 61 | ![img](http://oxjys514c.bkt.clouddn.com/https://spring.io/blog/2017/11/06/spring-boot-2-0-0-m6-available-now) 62 | 63 | 8: 在最新一期的 Spring Tips 中,我尝试了下 Spring Shell 。 64 | 65 | https://spring.io/blog/2017/11/01/spring-tips-spring-shell 66 | 67 | ![img](http://oxjys514c.bkt.clouddn.com/https://spring.io/blog/2017/11/01/spring-tips-spring-shell) 68 | 69 | 9: Thymeleaf 团队刚刚宣布 Thymeleaf 3.0.9 版本正式发布,在 StandardCache 中提高了命中率,使用了更严格的表达式执行模式来获取更高的安全性,以及针对 Spring Framework 5 集成后的一些 bug 修复。 70 | 71 | http://forum.thymeleaf.org/Thymeleaf-3-0-9-JUST-PUBLISHED-td4030728.html 72 | 73 | ![img](http://oxjys514c.bkt.clouddn.com/http://forum.thymeleaf.org/Thymeleaf-3-0-9-JUST-PUBLISHED-td4030728.html) 74 | 75 | 10: Pivotal 公司的 Toshiaki Maki 在使用 Pivotal Cloud Foundry 指标代理服务将日常指标从 Spring Boot 应用程序转发到Pivotal Cloud Foundry Metrics 服务方面汇总了一篇很好的文章。 76 | 77 | https://t.co/v9xDg9hs3e?amp=1 78 | 79 | ![img](http://oxjys514c.bkt.clouddn.com/https://t.co/v9xDg9hs3e?amp=1) 80 | 81 | 11: 我一定要重重的向你推荐在亚特兰大举办的 Spring Days 大会上 Laura Moore 的演讲,演讲的主题为:“Spring Didn't invent It ! ", 我真希望她能继续再讲几个小时!很高兴有这样的讨论。 82 | 83 | https://www.youtube.com/watch?feature=youtu.be&v=C51hPntRYGY&app=desktop 84 | 85 | ![img](http://oxjys514c.bkt.clouddn.com/https://www.youtube.com/watch?feature=youtu.be&v=C51hPntRYGY&app=desktop) 86 | 87 | https://twitter.com/SpringDays 88 | 89 | ![img](http://oxjys514c.bkt.clouddn.com/https://twitter.com/SpringDays) 90 | 91 | https://twitter.com/lk_moore 92 | 93 | ![img](http://oxjys514c.bkt.clouddn.com/https://twitter.com/lk_moore) 94 | 95 | 12: 我与其他架构师 Chris Richardson,Daniel Bryant,Glenn Engstrand 和 Alex Silva 一起参与了在 InfoQ 上关于服务管理与编排的讨论。非常有趣,希望你能一起参加讨论。 96 | 97 | https://www.infoq.com/articles/vp-microservices-orchestration-choreography 98 | 99 | ![img](http://oxjys514c.bkt.clouddn.com/https://www.infoq.com/articles/vp-microservices-orchestration-choreography) 100 | 101 | 13: InfoQ 上的一位作者 Amit K Gupta 对 Spring Tool Suite 3.9.1 版本中的新功能做了很好的描述。 102 | 103 | https://www.infoq.com/news/2017/10/sts-released 104 | 105 | ![img](http://oxjys514c.bkt.clouddn.com/https://www.infoq.com/news/2017/10/sts-released) 106 | 107 | 14: 严格来说它不是关于 Spring 的,但我总是喜欢讨论并且介绍一些 Java 语言的新功能。这篇由 Brian Goetz 撰写的文章非常值得一读,它同时也对 “ data classes ” 如何在未来的 Java 版本中发挥何种作用作出了深刻的描叙。非常谢谢我的朋友 Billy Korando (同时也是一名 Java 粉丝) 分享的这篇文章。 108 | 109 | http://cr.openjdk.java.net/~briangoetz/amber/datum.html 110 | 111 | ![img](http://oxjys514c.bkt.clouddn.com/http://cr.openjdk.java.net/~briangoetz/amber/datum.html) 112 | 113 | 15: 我喜欢这个由 Spring Frawork 和 Kotlin 一起构建的简单项目,该项目是 Sebastien Deleuze 编写的示范项目,目的在于介绍 Spring Boot 中的一些 API ,并且介绍如何在 Kotlin 中使用它们。 114 | 115 | https://github.com/sdeleuze/spring-kotlin-functional/tree/boot 116 | 117 | ![img](http://oxjys514c.bkt.clouddn.com/https://github.com/sdeleuze/spring-kotlin-functional/tree/boot) 118 | 119 | 16: Baeldung 的博客中关于 Micrometer metrics-publishing 库有一些很好的观点。Micrometer 是 Pivotal 的一个关键项目,主要用来在 Spring Boot 2.0 中 Actuator 的支持。 120 | 121 | http://www.baeldung.com/micrometer 122 | 123 | ![img](http://oxjys514c.bkt.clouddn.com/http://www.baeldung.com/micrometer) 124 | 125 | 17: 这里有一个支持 NetBeans 的 Spring Boot 插件,发布了新的版本 1.6.1,新增了一些提示语和快速修复。比如:如果在没有 spring-boot-configuration-processor 的情况下,使用 @ConfigurationProperties 将会得到警告。删除了废弃或未知的属性,以及更新 Spring Boot 1.5.8 版本等等。 126 | 127 | http://plugins.netbeans.org/plugin/67888/nb-springboot 128 | 129 | ![img](http://oxjys514c.bkt.clouddn.com/http://plugins.netbeans.org/plugin/67888/nb-springboot) 130 | 131 | 18: 现在已经支持在 Spring Initializr 上生成 Spring Shell 和 Spring Cloud Contract 项目了。 132 | 133 | https://twitter.com/snicoll/status/925453128996130816 134 | 135 | ![img](http://oxjys514c.bkt.clouddn.com/https://twitter.com/snicoll/status/925453128996130816) -------------------------------------------------------------------------------- /translated/20171122.md: -------------------------------------------------------------------------------- 1 | Hi ,Sping 粉丝们!非常感谢你能阅读本周的 Spring 周报!你能相信2017年我们只剩下六周了吗?时光总是这么不经意间就逝去了。 2 | 3 | 4 | 本周我在洛杉矶和社区成员交谈,然后在美国和家人朋友一起过感恩节。感恩节是一个表达我们感恩的机会。我敢肯定,当我说感谢你们的时候,Spring 和 Pivotal 的团队也同样希望表达他们对大家的感谢。感谢有你,这个令人惊叹,兴奋,充满活力,和有趣的社区才能一直存在。如果你的国家也同样有过感恩节的习俗,祝您感恩节快乐!本周我们做了很多事情,让我们来看看吧。 5 | 6 | 7 | 1: Spring Cloud 联合创始人兼负责人 Spencer Gibb 刚刚发布了 Spring Cloud Finchley M4 版本。这个新版本更新支持 Spring Boot 2.0.0.M6 。与往常一样,这是一个里程碑式的发布版,希望您能尝试一下。 8 | 9 | https://spring.io/blog/2017/11/18/spring-cloud-finchley-m4-released 10 | 11 | ![img](http://oxjys514c.bkt.clouddn.com/https://spring.io/blog/2017/11/18/spring-cloud-finchley-m4-released) 12 | 13 | 2: 在上周的 Spring Tips 中,我分享了一些 Spring Boot 构建插件的额外功能,包括 fat jars 和 thin jars。 14 | 15 | https://twitter.com/SpringTipsLive 16 | 17 | ![img](http://oxjys514c.bkt.clouddn.com/https://twitter.com/SpringTipsLive) 18 | 19 | https://spring.io/blog/2017/11/15/spring-tips-the-spring-boot-build-plugin 20 | 21 | ![img](http://oxjys514c.bkt.clouddn.com/https://spring.io/blog/2017/11/15/spring-tips-the-spring-boot-build-plugin) 22 | 23 | 3: 欢迎观看 Spring Boot 社区传奇人物 NicolasFränkel 的演讲,Spring Boot 底层机制的介绍。 24 | 25 | https://www.youtube.com/watch?v=zSJFx0iyrq4 26 | 27 | ![img](http://oxjys514c.bkt.clouddn.com/https://www.youtube.com/watch?v=zSJFx0iyrq4) 28 | 29 | 4: Abhinav Mehla 介绍了在 Pivotal Cloud Foundry 上的 MongoDB 企业版的功能。这太棒了! 30 | 31 | https://www.mongodb.com/blog/post/on-demand-mongodb-enterprise-on-pivotal-cloud-foundry 32 | 33 | ![img](http://oxjys514c.bkt.clouddn.com/https://www.mongodb.com/blog/post/on-demand-mongodb-enterprise-on-pivotal-cloud-foundry) 34 | 35 | 5: 这真是个好消息! Rod Johnson 的初创公司 Atomist ,旨在自动化开发应用程序端到端的生命周期,已经推出并发布了自动化平台。祝贺 Rod !这里还有一篇关于 Atomist 的博客。如果您想了解更多信息,请加入 SpringOne 平台 36 | 37 | https://sdtimes.com/atomist-announces-new-automation-platform-targeted-developers/ 38 | 39 | ![img](http://oxjys514c.bkt.clouddn.com/https://sdtimes.com/atomist-announces-new-automation-platform-targeted-developers/) 40 | 41 | https://venturebeat.com/2017/11/15/atomist-launches-to-help-devs-automate-repository-creation-and-code-deployment/ 42 | 43 | ![img](http://oxjys514c.bkt.clouddn.com/https://venturebeat.com/2017/11/15/atomist-launches-to-help-devs-automate-repository-creation-and-code-deployment/) 44 | 45 | http://springoneplatform.io 46 | 47 | ![img](http://oxjys514c.bkt.clouddn.com/http://springoneplatform.io) 48 | 49 | 6: 你在圣路易斯地区吗?欢迎在 2017 年 12 月 13 日参加 Spring 开发者 Advocate Mario Gray 和我一起举办的 Bootiful Testing。 50 | 51 | https://twitter.com/steve_womack/status/931653007221121025 52 | 53 | ![img](http://oxjys514c.bkt.clouddn.com/https://twitter.com/steve_womack/status/931653007221121025) 54 | 55 | 7: Auth0 有一篇有趣的文章,介绍了如何使用 Gradle 构建一个嵌入 Apache Tomcat 5 的 Spring 5 应用。(我认为如果你使用 Spring Boot 2 ,它可以自动配置安装 CLASSPATH 上的 Apache Tomcat)。 56 | 57 | https://auth0.com/blog/spring-5-embedded-tomcat-8-gradle-tutorial/ 58 | 59 | ![img](http://oxjys514c.bkt.clouddn.com/https://auth0.com/blog/spring-5-embedded-tomcat-8-gradle-tutorial/) 60 | 61 | 8: 自从 @SpringCentral 开通Twitter 帐户,最近被关注的程度越来越高。我最近也更新了我在 DZone 上 Java 微服务系列,现在已经可以下载了。 62 | 63 | https://twitter.com/springcentral/status/931570478187126785 64 | 65 | ![img](http://oxjys514c.bkt.clouddn.com/https://twitter.com/springcentral/status/931570478187126785) 66 | 67 | https://dzone.com/refcardz/learn-microservices-in-java 68 | 69 | ![img](http://oxjys514c.bkt.clouddn.com/https://dzone.com/refcardz/learn-microservices-in-java) 70 | 71 | 9: Spring Data 负责人 Oliver Gierke 分享了示例 Salespoint,这是一个基于 Spring Boot 的 POS 框架,用于在德累斯顿工业大学(我认为在德国它代表的是德国德累斯顿科技大学)的教学目的。这里是项目主页和代码仓库。 72 | 73 | https://st.inf.tu-dresden.de/SalesPoint/ 74 | 75 | ![img](http://oxjys514c.bkt.clouddn.com/https://st.inf.tu-dresden.de/SalesPoint/) 76 | 77 | https://bit.ly/2zbY0z5 78 | 79 | ![img](http://oxjys514c.bkt.clouddn.com/https://bit.ly/2zbY0z5) 80 | 81 | https://bit.ly/2zaPTmo 82 | 83 | ![img](http://oxjys514c.bkt.clouddn.com/https://bit.ly/2zaPTmo) 84 | 85 | 10: 本文介绍了 T-Mobile 如何重构其主要的单应用程序,并引入了 Cloud Foundry 来改变他们的开发流程。 86 | 87 | https://www.cloudfoundry.org/t-mobile-integrates-cloud-foundry-create-new-culture/?_lrsc=2e064143-6b50-44ec-a22d-ece03ddfe607 88 | 89 | ![img](http://oxjys514c.bkt.clouddn.com/https://www.cloudfoundry.org/t-mobile-integrates-cloud-foundry-create-new-culture/?_lrsc=2e064143-6b50-44ec-a22d-ece03ddfe607) 90 | 91 | 11: OAuth 专家 Will Tran 在这个精彩的 InfoQ 视频中讨论了如何使用 OAuth 2.0 来确保微服务的安全策略。 92 | 93 | https://www.infoq.com/presentations/oauth2-microservices-security 94 | 95 | ![img](http://oxjys514c.bkt.clouddn.com/https://www.infoq.com/presentations/oauth2-microservices-security) 96 | 97 | 12: Neo4J 传奇人物迈克尔·亨格(Michael Hunger)通过进行网络分析来演示了基于 Devoxx 会议谈话的数据采集和使用 Neo4J 的 Cypher 语言。如果你使用的是Neo4j(也许是Spring Data Neo4J),那么非常推荐去阅读一下。 98 | 99 | http://gist.asciidoctor.org/?dropboxs-56rhbvey5cp8c53%2Fdevoxx-conference-graph.adoc%3Fdl%3D0 100 | 101 | ![img](http://oxjys514c.bkt.clouddn.com/http://gist.asciidoctor.org/?dropboxs-56rhbvey5cp8c53%2Fdevoxx-conference-graph.adoc%3Fdl%3D0) 102 | 103 | 13: 我喜欢这个在云平台上演示的 Spring Boot 应用程序。 104 | 105 | https://t.co/BGZa26kGm7 106 | 107 | 14:另外 Oracle 演示如何使用 Spring Cloud Stream。 108 | 109 | https://medium.com/oracledevs/spring-cloud-stream-and-kafka-based-microservices-on-oracle-cloud-9889732149a 110 | -------------------------------------------------------------------------------- /translated/20171128.md: -------------------------------------------------------------------------------- 1 | Hi,Spring 粉丝们,非常高兴你能阅读这周的 Spring 周报!本周我在旧金山,然后会去德克萨斯州 · 奥斯汀,参加 G3 峰会。如果你在附近,欢迎过来和我交流或者打个招呼。之后会返回旧金山参加 SpringOne 2017 全球峰会,该峰会主题涵盖:敏捷,运维,应用开发和以云为中心的各种内容。千万不要错过! 2 | 3 | https://g3summit.com/conference/austin/2017/11/home 4 | 5 | ![img](http://oxjys514c.bkt.clouddn.com/https://g3sum) 6 | 7 | http://springoneplatform.io 8 | 9 | ![img](http://oxjys514c.bkt.clouddn.com/http://spring) 10 | 11 | 12 | 1: 在上周的 “Spring Tips” 中,我介绍了基于 Spring 的应用应该怎样测试。欢迎观看! 13 | 14 | https://spring.io/blog/2017/11/22/spring-tips-bootiful-testing 15 | 16 | ![img](http://oxjys514c.bkt.clouddn.com/https://sprin) 17 | 18 | 2: Spring 框架负责人 Juergen Hoeller 再次研究了一下我们大家的决定:Spring 将结束对 JDK6 的支持。 19 | 20 | https://spring.io/blog/2017/11/27/end-of-first-class-jdk-6-support 21 | 22 | ![img](http://oxjys514c.bkt.clouddn.com/https://sprin) 23 | 24 | 3: Spring 框架负责人和联席创始人 Juergen Hoeller 刚刚宣布 Spring Framework 5.0.2和4.3.13两个版本的发布。新版本是值得推荐的。特别的一点是,Castor XML 支持已经被弃用了,而且我们还正在取消对 JDK 6 的支持。 25 | 26 | https://spring.io/blog/2017/11/27/spring-framework-5-0-2-and-4-3-13-available-now 27 | 28 | ![img](http://oxjys514c.bkt.clouddn.com/https://sprin) 29 | 30 | 4: Spring Data 负责人 Mark Paluch 刚刚发布了Spring Data Ingalls SR9 和 Spring Data Kay SR2 两个版本。新版本修复了超过 90 个 issue,推荐所有用户进行升级。 31 | 32 | https://spring.io/blog/2017/11/27/spring-data-ingalls-sr9-and-kay-sr2-released 33 | 34 | ![img](http://oxjys514c.bkt.clouddn.com/https://sprin) 35 | 36 | 5: Spring Cloud 联合创始人 Spencer Gibb 刚刚发布了 Spring Cloud Edgware.RELEASE Available 版本。新版包含了 Spring Cloud Bus,Spring Cloud Sleuth和Zipkin,Spring Cloud Contract,Spring Cloud Security和Spring Cloud Stre 等一系列更新 37 | 38 | https://spring.io/blog/2017/11/27/spring-cloud-edgware-release-available 39 | 40 | ![img](http://oxjys514c.bkt.clouddn.com/https://sprin) 41 | 42 | 43 | 44 | 6: Spring Integration 开发主力 Artem Bilan 刚刚宣布 Spring Integration for AWS 1.1 GA版本现已发布。该版本包含对 S3,Kinesis 和 DynamoDB 的支持。 45 | 46 | https://spring.io/blog/2017/11/27/spring-integration-for-aws-1-1-ga-available 47 | 48 | ![img](http://oxjys514c.bkt.clouddn.com/https://sprin) 49 | 50 | 7: Mark Pollack 博士刚刚宣布了 Spring Cloud Skipper 1.0 M2。摘自文章中介绍:“ Skipper 是一个轻量级的工具,可以让你发现 Spring Boot 应用程序,并在多个云平台上的管理应用的生命周期。您可以独立使用 Skipper 或将其与持续集成工具集成,以帮助进行持续部署。” 51 | 52 | https://spring.io/blog/2017/11/21/spring-cloud-skipper-1-0-m2-released 53 | 54 | ![img](http://oxjys514c.bkt.clouddn.com/https://sprin) 55 | 56 | 8: Spring Security OAuth 开发主力 Joe Grandja 刚刚推出了 Spring Security OAuth 2.2.1 版本。此版本主要升级是修复了很多错误: 57 | 58 | https://spring.io/blog/2017/11/21/spring-security-oauth-2-2-1-released 59 | 60 | ![img](http://oxjys514c.bkt.clouddn.com/https://sprin) 61 | 62 | 9: 实际上,这个帖子本身和 Spring 没有太大关系,不过它非常具有新闻价值。敏捷开发中的哲学:值得学习和提高。 63 | 64 | https://johnfergusonsmart.com/exponential-learning-the-key-to-effective-leanagile-practices/ 65 | 66 | ![img](http://oxjys514c.bkt.clouddn.com/https://johnf) 67 | 68 | 10: 我非常喜欢 Arne Vandamme 的这篇文章,介绍 Spring CacheManager ,并且给出了一些操作技巧,特别是支持它的注释。 69 | 70 | https://foreach.be/blog/spring-cache-annotations-some-tips-tricks 71 | 72 | ![img](http://oxjys514c.bkt.clouddn.com/https://forea) 73 | 74 | 11: 我喜欢这篇讲述埃森哲和 Pivotal 公司合作关系的德语文章。(译注:埃森哲为一家咨询公司) 75 | 76 | https://www.heise.de/amp/meldung/Accenture-und-Pivotal-gruenden-gemeinsame-IT-Beratungsgesellschaft-3899624.html 77 | 78 | ![img](http://oxjys514c.bkt.clouddn.com/https://www.h) 79 | 80 | 12: 下周在美丽的旧金山举行 SpringOne Platform 2017 会议,介绍一些会议中精彩的内容。 81 | 82 | https://seroter.wordpress.com/2017/11/26/cant-figure-out-which-springone-platform-sessions-to-attend-ill-help-you-out/amp/ 83 | 84 | ![img](http://oxjys514c.bkt.clouddn.com/https://serot) 85 | 86 | 13: 社区朋友 Eberhard Wolff 在视频中演示了如何用 Spring Boot 和 Java 构建微服务。欢迎观看! 87 | 88 | https://www.youtube.com/watch?v=sHNYcEOsxp4&app=desktop 89 | 90 | ![img](http://oxjys514c.bkt.clouddn.com/https://www.y) 91 | 92 | 14: Michael Simons 在本文中介绍了使用 Spring Boot,Gradle 和 Docker Compose 进行集成测试。非常值得一看。 93 | 94 | http://info.michael-simons.eu/2017/11/20/integration-testing-with-docker-compose-gradle-and-spring-boot/ 95 | 96 | ![img](http://oxjys514c.bkt.clouddn.com/http://info.m) 97 | 98 | 15: 我真的很喜欢这篇文章,主要讲述 JUnit 5 和 AssertJ 的集成。谢谢我的朋友 Billy Korando 发的这个链接。 99 | 100 | http://blog.codeleak.pl/2017/11/junit-5-meets-assertj.html?spref=tw&m=1 101 | 102 | ![img](http://oxjys514c.bkt.clouddn.com/http://blog.c) 103 | 104 | 16: 我们非常高兴地宣布,响应式 Couchbase 支持现在已经添加到 Spring Initializr 中了。 105 | 106 | https://twitter.com/snicoll/status/930866250120646663 107 | 108 | ![img](http://oxjys514c.bkt.clouddn.com/https://twitt) 109 | 110 | 17: Christophe Bornet 在 Tweet 上发推:“ reactive-grpc 的 @grpcio 绑定,支持 v0.7 的响应式实现,已经支持 @rxjava 2 和 @ProjecteRctreactor。来体验吧 ”,所以感兴趣就去尝试吧。 111 | 112 | https://twitter.com/cbornet_/status/933738622674759680 113 | 114 | ![img](http://oxjys514c.bkt.clouddn.com/https://twitt) 115 | 116 | 18: 非常荣幸 Pivotal 入选了最佳 51 家创业公司,开始你 2018 的职业生涯吧。 117 | 118 | https://amp.businessinsider.com/51-enterprise-startups-to-bet-your-career-on-in-2018-2017-11 119 | 120 | ![img](http://oxjys514c.bkt.clouddn.com/https://amp.b) 121 | --------------------------------------------------------------------------------