当前位置:网站首页>Project Notes - Random 2
Project Notes - Random 2
2022-08-11 06:56:00 【kerodaisuki】
1. Upload the image to the tomcat server
Deploy the project to webapps
Adapt the deployment method to war mode and deploy the project under the webapps of tomcat
Two ways to deploy projects in Idea
war mode: upload the project to the webapps directory in the form of a wai package;
war exploaded mode: just the mapping of the directory, it is equivalent to tomcat starting in the project source folder
Create upload directory in webapps
The upload directory is specially used to save uploaded pictures
Upload image to server
Modify the output path of the image
1. Get the running directory information of the project
2. Intercept the directory path to webapps
3. Splice the output path and save the image to upload
Page Loading Image
When using tomcat as an image server, after storing the uploaded image, if you want the image to be accessible, you need to configure it in the idea:
1. Select extend source

Select the upload folder in the webapps directory
2. Upload a picture to the server
3. Load pictures on the internal page of the project

4. It can also be accessed through HTTP
http://localhost:8080/upload/xxxxxxxxx.jpgBeanUtils Tools
BeanUtils is one of the members of Apache commons components, mainly used to simplify the operation of JavaBean package data.All data submitted by a form can be encapsulated into JavaBeans.
. BeanUtils Object Common Methods
populate(Object bean, Map properties) : Encapsulate the Map data into the specified javabean, generally used to encapsulate all the data of the form into the javabean
setProperty(Object obj , String name ,Object value) : set property value
getProperty(Object obj , String name): get the property value
边栏推荐
猜你喜欢

CLR via C# 第一章 CLR的执行模型

【LeetCode-414】第三大的数

C语言预处理

勒索病毒eking.devos.mkp.makop.lockbit.eight.locked.roger等剖析及中毒文件恢复

IndexError: index 9 is out of bounds for axis 0 with size 9;数组下标溢出问题

JVM学习四:垃圾收集器与内存回收策略

软件使用代码签名证书的好处和必要性

【LeetCode-74】搜索二维矩阵

解决npm warn config global `--global`, `--local` are deprecated. use `--location=global` instead.

将UI的点击事件渗透下去
随机推荐
无胁科技-TVD每日漏洞情报-2022-7-31
C-动态内存管理
OpenGL WSAD按键操作和鼠标移动操控摄像机Camera类
Redis学习笔记【二】
无胁科技-TVD每日漏洞情报-2022-8-8
【LeetCode-69】x的平方根
无胁科技-TVD每日漏洞情报-2022-7-19
lua-复制一份table,修改新的table,不改变原来的table
无胁科技-TVD每日漏洞情报-2022-7-25
Lua loadstring 执行字符串中的代码
无胁科技-TVD每日漏洞情报-2022-8-7
swagger错误:WARN i.s.m.p.AbstractSerializableParameter - [getExample,421] - Illegal DefaultValue null
IndexError: index 9 is out of bounds for axis 0 with size 9;数组下标溢出问题
星盟-pwn-babyfmt
【LeetCode-205】同构字符串
C语言-7月22日- NULL和nullptr的深入了解以及VScode对nullptr语句报错问题的解决
无胁科技-TVD每日漏洞情报-2022-8-6
软件使用代码签名证书的好处和必要性
Unity的程序集Assembly 与 加快代码编译速度
【LeetCode-74】搜索二维矩阵