天天看点

day2:学习笔记day2 学习笔记

day2 学习笔记

1 maven阿里云镜像配置有问题

使用:

mvn install -Dfile=E:\pms_web-master\ojdbc14-10.2.0.5.jar -DgroupId=com.ccb -DartifactId=ojdbc14 -Dversion=10.2.0.5 -Dpackaging=jar

导入jar包报错

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install-file (default-cli) on project standalone-pom: Execution default-cli of goal org.apache.maven.plugins:maven-install-plugin:2.4:install-file failed: Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.maven.plugins:maven-install-plugin:jar:2.4 -> org.codehaus.plexus:plexus-utils:jar:3.0.5: Failed to read artifact descriptor for org.codehaus.plexus:plexus-utils:jar:3.0.5: Could not transfer artifact org.codehaus.plexus:plexus-utils:pom:3.0.5 from/to nexus-aliyun (https://maven.aliyun.com/repository/central): proxy.host.net -> [Help 1]

删除maven setting.xml里的阿里云镜像配置后成功

2 maven代理设置

以前使用校园网设置了代理,工作后发现maven下载依赖失败,生成了失败信息保存在库里,再次下载会读到失败信息然后停止下载。删除了库内的失败信息,再在maven里clean和intall

3 不支持的字符集ZHS16

添加依赖

<!-- https://mvnrepository.com/artifact/cn.easyproject/orai18n -->
<dependency>
<groupId>cn.easyproject</groupId>
<artifactId>orai18n</artifactId>
<version>12.1.0.2.0</version>
</dependency>
           

4 POJO

简单的Java对象(Plain Ordinary Java Objects)实际就是普通JavaBeans。可以作为value object或dto(Data Transform Object)

5 @RequestMapping

@RequestMapping 映射请求,也就是通过它来指定控制器可以处理哪些URL请求

@RequestMapping 中的 method 主要用来定义接收浏览器发来的何种请求,最基本的有四种,分别为:GET(查)、POST(增)、PUT(改)、DELETE(删)

6 @PathVariable

接收请求路径中占位符的值

@RequestMapping(value=”user/{id}/{name}”)
请求路径:http://localhost:8080/hello/show5/1/james
           

7 Oracle查询结果乱码

在idea里运行配置的tomcat配置的虚拟机选项中添加

-Dfile.encoding=UTF-8
           

8 CRUD

增加(Create)、检索(Retrieve)、更新(Update)和删除(Delete)

对数据库的操作

9 maven安裝jar命令

mvn install -Dfile=E:\pms_web-masterpoi-ooxml-schemas-3.9.jar -DgroupId=com.ccb -DartifactId=ojdbc14 -Dversion=10.2.0.5 -Dpackaging=jar