首页 文章 新番
动漫 学习 生活 日记 书籍 服务器 Bing
  • sonatype登陆失败

    怎么说呢,很久没有登陆了,然后今天升级JDK17提交了一个版本。先是证书过期了,搞了半天才发现证书过期了。然后发布时就是一直提示`401`。登陆网站一直提示密码账号密码错误,然后修改密码一直提示连接关闭。各种奇奇怪怪的提示,然后中午睡了一觉,起来发现居然啥问题没有了。估计应该是他们服务有问题。登陆失败:```Incorrectusername,passwordornopermissiontousetheNexusUserInterface.Tryagain.Pleaseloginbeforeattemptingfurtherrequests.```修改密码:```Thepasswordcouldnotbechangedbythecredentialsprovider.org.springframework.ldap.CommunicationException:connectionclosed;nestedexceptionisjavax.naming.CommunicationException:connectionclosed[Rootexceptionisjava.io.IOException:conn...

    2021年09月16日 sonatype
  • sonarqube JDK17启动失败

    错误日志:```javawrapper|-->WrapperStartedasConsolewrapper|LaunchingaJVM...jvm1|Wrapper(Version3.2.3)http://wrapper.tanukisoftware.orgjvm1|Copyright1999-2006TanukiSoftware,Inc.AllRightsReserved.jvm1|jvm1|2021.09.1613:26:54INFOapp[][o.s.a.AppFileSystem]CleaningorcreatingtempdirectoryD:\develop\sonarqube-9.0.1.46107\tempjvm1|2021.09.1613:26:55INFOapp[][o.s.a.es.EsSettings]Elasticsearchlisteningon[HTTP:127.0.0.1:9001,TCP:127.0.0.1:1025]jvm1|2021.09.1613:26:55INFOapp[][o.s.a.ProcessLauncherImpl]Launchprocess[[key...

    2021年09月16日 sonarqube JDK17
  • Maven打包gpg签名异常

    错误原因:证书过期异常日志:```java[ERROR]Failedtoexecutegoalorg.apache.maven.plugins:maven-gpg-plugin:3.0.1:sign(auto-build-sign)onprojectsnail.parent:Exitcode:2->[Help1]org.apache.maven.lifecycle.LifecycleExecutionException:Failedtoexecutegoalorg.apache.maven.plugins:maven-gpg-plugin:3.0.1:sign(auto-build-sign)onprojectsnail.parent:Exitcode:2atorg.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:215)atorg.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)atorg.apache.ma...

    2021年09月16日 Maven
  • 获取不到POST表单请求参数

    POST请求,设置请求内容`application/x-www-form-urlencoded`,后台获取不到请求参数。原来调用`request.getInputStream()`后再调用`request.getParameter()`就不能获取参数了。本来是想做一个兼容获取参数的方法,所以需要先调用`request.getParameterNames()`判断是否有参数判断是否调用`request.getParameter()`,再通过`request.getInputStream()`获取其他请求数据。

    2021年09月02日 POST
  • Eclipse彻底删除插件

    Eclipse通过Uninstall卸载后还有些东西没有彻底删除:1.`eclipse\plugins`里面是否还有插件2.`eclipse\configuration\org.eclipse.osgi`里面是否还有配置(含有`.delete`就是已经删除插件配置)如果不确定文件是否属于删除的插件时不建议自行修改

    2021年09月01日 Eclipse
  • SpringBoot Ajax跨域请求sessionId

    最经做一个功能时发现Ajax跨域并不能上送sessionId,每次请求sessionId都不一样,就是sessionId改变了,所以研究了一下。解决办法如下:添加SpringBoot跨域配置:```@ConfigurationclassWebConfigimplementsWebMvcConfigurer{@OverridepublicvoidaddCorsMappings(CorsRegistryregistry){registry.addMapping("/**").allowedOrigins("https://testjd.com:8080","https://testtaobao.com:8080").allowCredentials(true).allowedHeaders("*").allowedMethods("*").maxAge(1800);}}```Ajax添加Cookie配置withCredentials:```$.ajax({"xhrFields":{withCredentials:true},url:"https://testjd.com:8080",success:functio...

    2021年08月26日 SpringBoot Ajax sessionId
  • 获取请求数据

    做了一个获取请求数据的页面,发送请求到[https://www.acgist.com/demo/request](https://www.acgist.com/demo/request/print),然后访问[https://www.acgist.com/demo/request/print](https://www.acgist.com/demo/request/print),就可以拿到上次请求的数据了。主要包含数据:请求方法、请求头还有请求数据。

    2021年08月24日 HTTP
  • Java访问错误

    ```Thepackageorg.eclipse.core.runtimeisaccessiblefrommorethanonemodule:org.eclipse.core.contenttype,org.eclipse.core.jobs,org.eclipse.core.runtime,org.eclipse.equinox.common,org.eclipse.equinox.preferences,org.eclipse.equinox.registryThepackageorg.eclipse.core.runtimeisaccessiblefrommorethanonemodule:org.eclipse.core.contenttype,org.eclipse.core.jobs,org.eclipse.core.runtime,org.eclipse.equinox.common,org.eclipse.equinox.preferences,org.eclipse.equinox.registryIStatuscannotberesolvedtoatypeMultiStatuscannot...

    2021年08月19日 Java
  • Eclipse错误

    今天升级了`Eclipse2021-06(4.20.0)`,默认就支持JDK16了,但是启动后发现提示错误:```javaCouldnotinitializeclassorg.apache.maven.plugin.war.util.WebappStructureSerializer```解决办法在Eclipse配置`eclipse.ini`中添加`--illegal-access=permit`重启就可以了。参考文章:[https://www.5axxw.com/questions/content/tts8j7](https://www.5axxw.com/questions/content/tts8j7)

    2021年07月05日 Eclipse
  • 从零开始到下载世界:Tracker服务器和DHT网络

    ##如何获取下载客户端(Peer)将下载同一个资源的客户端视为Peer,开始下载的时候第一个任务就是获取Peer,越多越好,越优质越好。这时我们就需要从Tracker服务器和DHT网络中获取其他Peer。##什么是Tracker服务器Tracker服务器可以使用UDP/HTTP协议通过资源特征码(InfoHash)获取Peer的地址和端口。Tracker服务器很多时候都连接不上,所以使用优质的Tracker非常重要。[HTTPTracker](https://wiki.theory.org/index.php/BitTorrentSpecification)[代码实现](https://gitee.com/acgist/snail/blob/master/snail/src/main/java/com/acgist/snail/net/torrent/tracker/HttpTrackerSession.java)[UDPTracker](http://www.bittorrent.org/beps/bep_0015.html)[代码实现](https://gitee.com/acgist/snail/blo...

    2021年06月10日 Tracker DHT
  • 从零开始到下载世界:种子文件

    ##种子文件作用种子文件主要用来描述文件信息:文件名称、大小、校验,还有如何获取下载客户端的Tracker服务器[从零开始到下载世界](https://www.acgist.com/article/588.html)

    2021年06月10日 种子文件
  • 从零开始到下载世界:BT入门

    ##什么是BT?简单一点来说就是P2P文件传输协议,就是用户和用户之间进行文件分享。用户下载的同时会向其他用户上传已经下载的数据,所以和FTP、HTTP这些协议相比,下载(分享)越多下载越快。详细参见:[BitTorrent](https://baike.baidu.com/item/BitTorrent/142795)##如何实现BT协议?BT协议里面其实包含很多协议,这些协议你可以在[BitTorrent.org](http://bittorrent.org/beps/bep_0000.html)查看。这里面有非常多的协议,这些协议有不同的状态:最终、接收、草稿、废弃。当然这些协议不是需要全部实现,可以选择实现必须的协议即可,还可以自定义协议。查看[蜗牛实现协议](https://gitee.com/acgist/snail/blob/master/docs/PROTOCOL.md)后面基本上会按照[BitTorrent.org](http://bittorrent.org/beps/bep_0000.html)里面的协议顺序进行逐个讲解如何实现BT协议。[从零开始到下载世界](https://www.a...

    2021年06月09日 BT BitTorrent
  • 手机摄像头应用

    [调用摄像头拍照](//www.acgist.com/demo/photo/index.html):调用摄像头直接拍照[调用摄像头获取人脸数据](//www.acgist.com/demo/face/index.html):调用摄像头连续获取几组人脸数据(前置摄像头)**注意:摄像头调用需要使用https协议,http测试只能使用localhost,不能使用IP地址。**

    2021年05月18日 HTML5 摄像头
  • Java性能分析工具

    jconsole:JDK自带监控一些GC、内存、线程、CPU等等信息。jvisualvm:JDK1.8以前自带功能和jconsole差不多,但是显示更加丰富。jmc:JDK1.8以前自带下载地址:[https://jdk.java.net/jmc/](https://jdk.java.net/jmc/)或者使用:[https://www.oracle.com/java/technologies/javase/products-jmc8-downloads.html](https://www.oracle.com/java/technologies/javase/products-jmc8-downloads.html)更加丰富的监控内容,推荐使用。此外还有一些常用命令:jps、jcmd、jmap、pmap、jinfo、jstack、valgrind、gperftools等等```jpsjcmdpidnamejmap-histo:livepidpmappidjinfopidjstackpid```##jcmd参数```Compiler.CodeHeap_AnalyticsCompiler.codecacheCo...

    2021年05月14日 Java
  • Apache Base64工具注意事项

    主要就是两种写法:```javaBase64.encodeBase64String(byte[])newString(Base64.encodeBase64(byte[]))```主要问题就是上面写法会有换行符,下面没有换行符。

    2021年05月08日 Apache Base64
  • Shiro和SpringBoot导致@Cacheable失效

    使用`shiro-spring-boot-starter`做权限控制,但是发现导致`@Cacheable`失效了。这时需要添加配置:```java@BeanpublicDefaultAdvisorAutoProxyCreatordefaultAdvisorAutoProxyCreator(){DefaultAdvisorAutoProxyCreatordefaultAdvisorAutoProxyCreator=newDefaultAdvisorAutoProxyCreator();defaultAdvisorAutoProxyCreator.setProxyTargetClass(true);//defaultAdvisorAutoProxyCreator.setUsePrefix(true);returndefaultAdvisorAutoProxyCreator;}```或者直接添加配置:```javaspring.aop.proxy-target-class=true```还有一个问题也能使用这个解决:```javaorg.springframework.beans.factory.Unsatisfi...

    2021年04月22日 Shiro SpringBoot @Cacheable
  • shields动态生成Git项目徽章

    项目地址:[https://shields.io/](https://shields.io/)之前都是用的shields提供的一些build、version这些,但是码云就用不了。本来今天想要重新做一个的,但是发现原来还可以动态生成。格式:```https://img.shields.io/badge/dynamic/json?url=&label=&query=<$.DATA.SUBDATA>&color=&prefix=&suffix=https://img.shields.io/badge/dynamic/xml?url=&label=&query=&color=&prefix=&suffix=https://img.shields.io/badge/dynamic/yaml?url=&label=&query=<$.DATA.SUBDATA>&color=&prefix=&suffix=```比如码云stars:```https://img.shields.i...

    2021年03月03日 shields github gitee
  • 软件URL Scheme

    ####微信URLScheme[https://www.zhihu.com/question/30616809](https://www.zhihu.com/question/30616809)####支付宝URLScheme[https://www.jianshu.com/p/ebaedd551365](https://www.jianshu.com/p/ebaedd551365)[https://ld246.com/article/1596449463334](https://ld246.com/article/1596449463334)

    2021年02月24日 URL Scheme
  • Java新版switch

    ##使用箭头符号可以省略`break`##使用`yield`可以有返回值不能和`return`一起使用,箭头符号直接跟值可以省略`yield`。*return:跳出方法*break:跳出switch*yield:跳出switch*->:跳出switch测试代码:```javapublicinttestSwitch(intkey){System.out.println("----------------1");switch(key){case1:System.out.println("1");break;case2:System.out.println("2");break;case3:case4,5:System.out.println("3");break;default:System.out.println("default");break;}System.out.println("----------------2");switch(key){case1:System.out.println("fallthrough=1");case2:System.out.println("fallthroug...

    2021年02月23日 Java switch
  • github actions windows环境变量

    多个步骤之间传递变量:```yml#获取版本echo"version=${GITHUB_REF##*/}">>$GITHUB_ENV```但是window获取不到,需要使用下面的写法:```yml#获取版本$version="${{github.ref}}".substring("refs/tags/".length)echo"version=$version"|Out-File-FilePath$env:GITHUB_ENV-Encodingutf8-Append```还有就是upload-release-asset不能一次上传多个文件使用hub命令上传```ymlhubreleaseedit-asnail-${{env.version}}.${{env.suffix}}-m"${{env.version}}"${{env.version}}```>windows必须填写备注`-m`[完整打包脚本](https://github.com/acgist/snail/blob/master/.github/workflows/package.yml)话说Github的发行版本文件大小只有单个文...

    2021年02月21日 github actions windows
1...78910111213...31

关于 ACGIST

Copyright © 2013-2025 ACGIST.COM. All Rights Reserved.