Spring多个同类型bean的优先级

@Primary 标注多个同类型bean中,Autowire首先考虑的bean @Component public class FooService { private FooRepository fooRepository; @Autowired public FooService(FooRepository fooRepository) { this.fooRepository = fooRepository; } } @Component public class JdbcFooRepository extends FooRepository { public JdbcFooRepository(DataSource dataSource) { // ... } } @Primary @Component public class HibernateFooRepository extends

jenkins sh permission denied

Jenkinsfile pipeline { agent any stages { stage('Test') { steps { sh './mvnw test' } } } post { always { junit 'target/surefire-reports/*.xml' } } } 异常 ./mvnw: Permission denied 解决方案 git update-index --chmod +x mvnw

免费API收集

Google翻译 GET http://translate.google.cn/translate_a/single?client=gtx&dt=t&dj=1&ie=UTF-8&sl=auto&tl=zh_CN&q=hence 返回示例 { "sentences": [ { "trans": "因此", "orig": "hence", "backend": 10 } ], "src": "en", "confidence": 1.0, "spell": {}, "ld_result": { "srclangs": [ "en" ], "srclangs_confidences": [ 1.0 ], "extended_srclangs": [ "en" ] } } 微软翻译 GET http://api.microsofttranslator.com/v2/Http.svc/Translate?appId=AFC76A66CF4F434ED080D245C30CF1E71C22959C&from=&to=zh-Hans&text=hence 返回