JAVA

2020-02-07

JAVA

HotSpot https://adoptium.net/releases.html

OpenJ9 https://developer.ibm.com/languages/java/semeru-runtimes/downloads

Java SE Downloads https://www.oracle.com/java/technologies/javase-downloads.html

Oracle Java历史版本下载 https://www.oracle.com/java/technologies/oracle-java-archive-downloads.html

Java升级安装1.8版本

wget https://download.oracle.com/otn/java/jdk/8u271-b09/61ae65e088624f5aaa0b1d2d801acb16/jdk-8u271-linux-x64.tar.gz
tar -zxvf jdk-8u271-linux-x64.tar.gz
mv jdk1.8.0_271 /usr/lib/jvm/

安装:

update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0_271/bin/java 1
update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.8.0_271/bin/javac 1

最后的1表示Priority优先级

切换版本:

# update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                            Priority   Status
------------------------------------------------------------
* 0            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      auto mode
  1            /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java   1071      manual mode
  2            /usr/lib/jvm/jdk1.8.0_271/bin/java               1         manual mode

# update-alternatives --config javac

出现了这个,由于之前安装的是1.7版本,所以要进行选择,选择1.8版本,故选择2

MAVEN

上传本地jar包到私服

项目中有一个依赖包,包名是util-1.0.jar,想把它传到私服中

mvn deploy:deploy-file -DgroupId=com.bric -DartifactId=util -Dversion=1.0 -Dpackaging=jar -Dfile=util-1.0.jar -Durl=http://192.168.11.200:8081/nexus/content/repositories/thirdparty/ -DrepositoryId=thirdparty

对应settings.xml

<mirrors>    
	<mirror>
        <id>thirdparty</id>
        <name>thirdparty</name>
        <mirrorOf>*</mirrorOf>
        <url>http://192.168.11.200:8081/nexus/content/repositories/thirdparty/</url>
    </mirror>
</mirrors>
<servers>
    <server>
        <id>thirdparty</id>
        <username>admin</username>
        <password>123456</password>
    </server>
</servers>

注意:不要往public仓库传,该仓库没上传权限的。

maven deploy 400错误

这是由于,maven 不允许重复向release仓库中deploy相同的文件, 解决办法,修改release版本

或者修改仓库权限: Repositories -> 3rd party -> configuration -> Deployment Policy -> 改成 Allow Redeploy

手动上传到私服

Nexus Repository Manager OSS 2 版本中: Repositories -> 3rd party -> artifact upload -> 选择pom和jar文件 -> 点upload artifact

SQL

Mybatis-plus常用API全套教程 https://www.toutiao.com/i6869621037831717387 BAK

后台管理系统

Timo (SpringBoot、JPA 、Thymeleaf) http://www.linln.cn/

SmartAdmin 一套互联网企业级的通用型中后台解决方案 https://gitee.com/lab1024/smart-admin

BaseAdmin 一套简单通用的后台管理系统 https://github.com/huanzi-qch/base-admin

litemall 小商场系统 https://gitee.com/linlinjava/litemall

mall4j 开源的电商系统 https://gitee.com/gz-yami/mall4j

web-flash (SpringBoot、JPA、Vue.js) https://gitee.com/enilu/web-flash

SPTools (SpringBoot、JPA、Shiro) https://gitee.com/52itstyle/SPTools

community 开源论坛、问答系统 https://github.com/codedrinker/community