Maven
- 库类型的jar包(非运行包),不要用插件spring-boot-maven-plugin
- application.properties 改成 application.yml
- Windows本地仓库默认地址是:C:\Users\[用户名]\.m2\repository
- jar无法重新再下的处理:删除本地仓库里对应的"*.lastUpdated"。
- Maven私有仓库:Nexus
- pom.xml上加仓库定义
<repositories> <repository> <id>maven-swao</id> <name>Maven swao Mirror</name> <url>http://mvn.swao.cn/nexus/content/repositories/thirdparty/</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories>
yml
- 使用内置函数
- str: ${random.value} # 32位的随机字符串
- uuid: ${random.uuid} # uuid
- num1: ${random.int(100)} # 100内随机整数
- num2: ${random.int(0,99)} # 0-99内的随机整数
- 使用yml定义的变量
- url: ${th.const.server}
- url: tcp://${th.const.server}:12345
- 使用环境变量
- path: ${M2_HOME:abc} # 设置成环境变量环境变量,如没有则使用默认值"abc"