编程语言-Java-问题整理

用Gradle构建Spring项目

./gradlew bootrun
 

打jar包

jar -cvf xxx.jar -C src/ .

 

Springboot启动后只能使用127.0.0.1访问,局域网和外网无法访问

 https://blog.csdn.net/weixin_40693633/article/details/80860731
 

IDEA中通过maven更新依赖版本(手动强制更新依赖)

https://segmentfault.com/a/1190000019711479

 

ant风格路径表达式(常用在Spring MVC、Spring Boot项目)

通配符 说明
? 匹配任何单字符
* 匹配0或者任意数量的字符
** 匹配0或者更多的目录

 

Maven 和 Spring Boot 的那些事儿

https://segmentfault.com/a/1190000021687878?utm_source=tag-newest

 

the program javac can be found in the following packages ubuntu

 sudo update-alternatives --install /usr/bin/javac javac /opt/java/jdk1.7.0_80/bin/javac 100

 

java: 无效的源发行版: 8

https://blog.csdn.net/yaolong336/article/details/78717676

 

jar文件运行报错 -  Exception in thread "main" java.lang.UnsupportedClassVersionError

低版本运行高版本文件 - 升级Java版本 如1.7->1.8

安装JDK出现Error opening registry key'software\Javasoft\Java Runtime Environment

win7 64位,删掉Windows\System32下的java.exe, javaw.exe 

Unhandled exception:java.io.IOException

在对应的方法后 throws Exception

IntelliJ IDEA 相关

新建Java项目
Create New Project  - 》选择下载的jdk版本 -》填写工作空间名和项目名 -》 创建package -》创建Class

快捷键
public static void main(String[] args -> psvm + Tab 
System.out.println()  -> sout + return

IDEA打war包
https://blog.csdn.net/qq_34872748/article/details/100390922
posted @ 2019-08-04 21:04  7hang  阅读(219)  评论(0编辑  收藏  举报