springboot之jpa的支持
1、springboot之jpa支持
2、Springboot+bootstrap界面版之增删改查及图片上传
springboot之jpa支持
导入相关pom依赖
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
application.yml文件配置
server:
port:
servlet:
context-path: / spring:
jpa:
hibernate:
ddl-auto: update
show-sql: true
datasource:
#.JDBC
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/xm1?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
username: root
password:
druid:
initial-size:
min-idle:
max-active:
max-wait:
time-between-eviction-runs-millis:
min-evictable-idle-time-millis:
validation-query: SELECT FROM DUAL
test-while-idle: true
test-on-borrow: true
test-on-return: false
pool-prepared-statements: true
max-pool-prepared-statement-per-connection-size:
filter:
stat:
merge-sql: true
slow-sql-millis:
web-stat-filter:
enabled: true
url-pattern: /*
exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
session-stat-enable: true
session-stat-max-count: 100
stat-view-servlet:
enabled: true
url-pattern: /druid/*
reset-enable: true
login-username: admin
login-password: admin
allow: 127.0.0.1
#deny: 192.168.1.100
自动建表相关代码
package com.jt.springboot03.entity; import lombok.Data; import javax.persistence.*; /**
* @author jt
* @site www.xiaomage.com
* @company xxx公司
* @create 2019-11-30 16:04
*/
@Data
@Table(name="t_springboot_book_2019")
@Entity
public class Book {
@Id
@GeneratedValue
private Integer bid;
@Column(length = )
private String bname;
@Column
private Float price;
}
controller层
package com.jt.springboot03.controller; import com.jt.springboot03.entity.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import java.util.List; /**
* @author jt
* @site www.xiaomage.com
* @company xxx公司
* @create 2019-11-30 16:15
*/
@RestController
public class BookController {
@Autowired
private JpaRepository jpaDao; @RequestMapping("/add")
public String add(Book book) {
jpaDao.save(book);
return "success";
} @RequestMapping("/edit")
public String edit(Book book) {
jpaDao.save(book);
return "success";
} @RequestMapping("/del")
public String del(Book book) {
jpaDao.delete(book);
return "success";
} @RequestMapping("/getOne")
public Book getOne(Integer bid) {
// 会出现懒加载问题:org.hibernate.LazyInitializationException: could not initialize proxy - no Session
// return jpaDao.getOne(bid);
return (Book)jpaDao.findById(bid).get();
} @RequestMapping("/getAll")
public List<Book> getAll() {
return jpaDao.findAll();
}
}
BookRepository
package com.jt.springboot03.repository; import com.jt.springboot03.entity.Book;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository; /**
* @author jt
* @site www.xiaomage.com
* @company xxx公司
* @create 2019-11-30 16:13
*/
@Repository
public interface BookRepository extends JpaRepository<Book,Integer> { }
Springboot+bootstrap界面版之增删改查及图片上传
pom依赖
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.</version>
</dependency>
实体类
package com.jt.springboot03.entity; import lombok.ToString; import javax.persistence.*; @Entity
@Table(name = "t_springboot_teacher")
@ToString
public class Teacher {
@Id
@GeneratedValue
private Integer tid;
@Column(length = )
private String tname;
@Column(length = )
private String sex;
@Column(length = )
private String description;
@Column(length = )
private String imagePath; public Integer getTid() {
return tid;
} public void setTid(Integer tid) {
this.tid = tid;
} public String getTname() {
return tname;
} public void setTname(String tname) {
this.tname = tname;
} public String getSex() {
return sex;
} public void setSex(String sex) {
this.sex = sex;
} public String getDescription() {
return description;
} public void setDescription(String description) {
this.description = description;
} public String getImagePath() {
return imagePath;
} public void setImagePath(String imagePath) {
this.imagePath = imagePath;
}
}
application.yml文件配置
server:
port:
servlet:
context-path: / spring:
jpa:
hibernate:
ddl-auto: update
show-sql: true
datasource:
#.JDBC
type: com.alibaba.druid.pool.DruidDataSource
driver-class-name: com.mysql.jdbc.Driver
url: jdbc:mysql://localhost:3306/xm1?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC
username: root
password:
druid:
initial-size:
min-idle:
max-active:
max-wait:
time-between-eviction-runs-millis:
min-evictable-idle-time-millis:
validation-query: SELECT FROM DUAL
test-while-idle: true
test-on-borrow: true
test-on-return: false
pool-prepared-statements: true
max-pool-prepared-statement-per-connection-size:
filter:
stat:
merge-sql: true
slow-sql-millis:
web-stat-filter:
enabled: true
url-pattern: /*
exclusions: "*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*"
session-stat-enable: true
session-stat-max-count: 100
stat-view-servlet:
enabled: true
url-pattern: /druid/*
reset-enable: true
login-username: admin
login-password: admin
allow: 127.0.0.1
#deny: 192.168.1.100
thymeleaf:
cache: false servlet:
multipart:
max-file-size: 20MB
max-request-size: 60MB
上传文件映射配置类MyWebAppConfigurer.java
package com.jt.springboot03.config; import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport; /**
* @author jt
* @site www.xiaomage.com
* @company xxx公司
* @create 2019-11-30 16:40
*/
@Configuration
public class MyWebAppConfigurer extends WebMvcConfigurationSupport {
@Override
protected void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
registry.addResourceHandler("/uploadImages/**").addResourceLocations("file:E:/temp/");
super.addResourceHandlers(registry);
}
}
utils包
package com.jt.springboot03.utils; import javax.servlet.http.HttpServletRequest;
import java.util.Map; /**
* @author jt
* @site www.xiaomage.com
* @company xxx公司
* @create 2019-11-30 16:43
*/
/**
* 分页工具类
*/
public class PageBean { private int page = ;// 页码 private int rows = ;// 页大小 private int total = ;// 总记录数 private boolean pagination = true;// 是否分页 // 保存上次查询的参数
private Map<String, String[]> paramMap;
// 保存上次查询的url
private String url; public void setRequest(HttpServletRequest request) {
String page = request.getParameter("page");
String rows = request.getParameter("offset");
String pagination = request.getParameter("pagination");
this.setPage(page);
this.setRows(rows);
this.setPagination(pagination);
this.setUrl(request.getRequestURL().toString());
this.setParamMap(request.getParameterMap());
} public PageBean() {
super();
} public Map<String, String[]> getParamMap() {
return paramMap;
} public void setParamMap(Map<String, String[]> paramMap) {
this.paramMap = paramMap;
} public String getUrl() {
return url;
} public void setUrl(String url) {
this.url = url;
} public int getPage() {
return page;
} public void setPage(int page) {
this.page = page;
} public void setPage(String page) {
if(StringUtils.isNotBlank(page)) {
this.page = Integer.parseInt(page);
}
} public int getRows() {
return rows;
} public void setRows(String rows) {
if(StringUtils.isNotBlank(rows)) {
this.rows = Integer.parseInt(rows);
}
} public int getTotal() {
return total;
} public void setTotal(int total) {
this.total = total;
} public void setTotal(String total) {
if(StringUtils.isNotBlank(total)) {
this.total = Integer.parseInt(total);
}
} public boolean isPagination() {
return pagination;
} public void setPagination(boolean pagination) {
this.pagination = pagination;
} public void setPagination(String pagination) {
if(StringUtils.isNotBlank(pagination) && "false".equals(pagination)) {
this.pagination = Boolean.parseBoolean(pagination);
}
} /**
* 最大页
* @return
*/
public int getMaxPage() {
int max = this.total/this.rows;
if(this.total % this.rows !=) {
max ++ ;
}
return max;
} /**
* 下一页
* @return
*/
public int getNextPage() {
int nextPage = this.page + ;
if(nextPage > this.getMaxPage()) {
nextPage = this.getMaxPage();
}
return nextPage;
} /**
* 上一页
* @return
*/
public int getPreviousPage() {
int previousPage = this.page -;
if(previousPage < ) {
previousPage = ;
}
return previousPage;
} /**
* 获得起始记录的下标
*
* @return
*/
public int getStartIndex() {
return (this.page - ) * this.rows;
} @Override
public String toString() {
return "PageBean [page=" + page + ", rows=" + rows + ", total=" + total + ", pagination=" + pagination + "]";
}
}
package com.jt.springboot03.utils; import java.util.Map;
import java.util.Set; /**
* @author jt
* @site www.xiaomage.com
* @company xxx公司
* @create 2019-11-30 16:45
*/
public class PageUtil {
public static String createPageCode(PageBean pageBean) {
StringBuffer sb = new StringBuffer();
/*
* 拼接向后台提交数据的form表单
* 注意:拼接的form表单中的page参数是变化的,所以不需要保留上一次请求的值
*/
sb.append("<form id='pageBeanForm' action='"+pageBean.getUrl()+"' method='post'>");
sb.append("<input type='hidden' name='page'>");
Map<String, String[]> parameterMap = pageBean.getParamMap();
if(parameterMap != null && parameterMap.size() > ) {
Set<Map.Entry<String, String[]>> entrySet = parameterMap.entrySet();
for (Map.Entry<String, String[]> entry : entrySet) {
if(!"page".equals(entry.getKey())) {
String[] values = entry.getValue();
for (String val : values) {
sb.append("<input type='hidden' name='"+entry.getKey()+"' value='"+val+"'>");
}
}
}
}
sb.append("</form>"); if(pageBean.getTotal()==){
return "未查询到数据";
}else{
sb.append("<li><a href='javascript:gotoPage(1)'>首页</a></li>");
if(pageBean.getPage()>){
sb.append("<li><a href='javascript:gotoPage("+pageBean.getPreviousPage()+")'>上一页</a></li>");
}else{
sb.append("<li class='disabled'><a href='javascript:gotoPage(1)'>上一页</a></li>");
}
for(int i=pageBean.getPage()-;i<=pageBean.getPage()+;i++){
if(i<||i>pageBean.getMaxPage()){
continue;
}
if(i==pageBean.getPage()){
sb.append("<li class='active'><a href='#'>"+i+"</a></li>");
}else{
sb.append("<li><a href='javascript:gotoPage("+i+")'>"+i+"</a></li>");
}
}
if(pageBean.getPage()<pageBean.getMaxPage()){
sb.append("<li><a href='javascript:gotoPage("+pageBean.getNextPage()+")'>下一页</a></li>");
}else{
sb.append("<li class='disabled'><a href='javascript:gotoPage("+pageBean.getMaxPage()+")'>下一页</a></li>");
}
sb.append("<li><a href='javascript:gotoPage("+pageBean.getMaxPage()+")'>尾页</a></li>");
} /*
* 给分页条添加与后台交互的js代码
*/
sb.append("<script type='text/javascript'>");
sb.append(" function gotoPage(page) {");
sb.append(" document.getElementById('pageBeanForm').page.value = page;");
sb.append(" document.getElementById('pageBeanForm').submit();");
sb.append(" }");
sb.append(" function skipPage() {");
sb.append(" var page = document.getElementById('skipPage').value;");
sb.append(" if(!page || isNaN(page) || parseInt(page)<1 || parseInt(page)>"+pageBean.getMaxPage()+"){");
sb.append(" alert('请输入1~N的数字');");
sb.append(" return;");
sb.append(" }");
sb.append(" gotoPage(page);");
sb.append(" }");
sb.append("</script>");
return sb.toString();
}
}
package com.jt.springboot03.utils; import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Set; /**
* @author jt
* @site www.xiaomage.com
* @company xxx公司
* @create 2019-11-30 16:41
*/
public class StringUtils {
// 私有的构造方法,保护此类不能在外部实例化
private StringUtils() {
} /**
* 如果字符串等于null或去空格后等于"",则返回true,否则返回false
*
* @param s
* @return
*/
public static boolean isBlank(String s) {
boolean b = false;
if (null == s || s.trim().equals("")) {
b = true;
}
return b;
} /**
* 如果字符串不等于null或去空格后不等于"",则返回true,否则返回false
*
* @param s
* @return
*/
public static boolean isNotBlank(String s) {
return !isBlank(s);
} /**
* set集合转string
* @param hasPerms
* @return
*/
public static String SetToString(Set hasPerms){
return Arrays.toString(hasPerms.toArray()).replaceAll(" ", "").replace("[", "").replace("]", "");
} /**
* 转换成模糊查询所需参数
* @param before
* @return
*/
public static String toLikeStr(String before){
return isBlank(before) ? null : "%"+before+"%";
} /**
* 将图片的服务器访问地址转换为真实存放地址
* @param imgpath 图片访问地址(http://localhost:8080/uploadImage/2019/01/26/20190126000000.jpg)
* @param serverDir uploadImage
* @param realDir E:/temp/
* @return
*/
public static String serverPath2realPath(String imgpath, String serverDir, String realDir) {
imgpath = imgpath.substring(imgpath.indexOf(serverDir));
return imgpath.replace(serverDir,realDir);
} /**
* 过滤掉集合里的空格
* @param list
* @return
*/
public static List<String> filterWhite(List<String> list){
List<String> resultList=new ArrayList<String>();
for(String l:list){
if(isNotBlank(l)){
resultList.add(l);
}
}
return resultList;
} /**
* 从html中提取纯文本
* @param strHtml
* @return
*/
public static String html2Text(String strHtml) {
String txtcontent = strHtml.replaceAll("</?[^>]+>", ""); //剔出<html>的标签
txtcontent = txtcontent.replaceAll("<a>\\s*|\t|\r|\n</a>", "");//去除字符串中的空格,回车,换行符,制表符
return txtcontent;
} public static void main(String[] args) {
}
}
service层
TeacherService
package com.jt.springboot03.service; import com.jt.springboot03.entity.Teacher;
import com.jt.springboot03.utils.PageBean;
import org.springframework.data.domain.Page; /**
* @author jt
* @site www.xiaomage.com
* @company xxx公司
* @create 2019-11-30 16:57
*/
public interface TeacherService {
public Teacher save(Teacher teacher);
public void deleteById(Integer id);
public Teacher findById(Integer id);
public Page<Teacher> listPager(Teacher teacher, PageBean pageBean); }
TeacherServiceImpl
package com.jt.springboot03.service.impl; import com.jt.springboot03.entity.Teacher;
import com.jt.springboot03.repository.TeacherDao;
import com.jt.springboot03.service.TeacherService;
import com.jt.springboot03.utils.PageBean; import com.jt.springboot03.utils.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.domain.Specification;
import org.springframework.stereotype.Service; import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root; @Service
public class TeacherServiceImpl implements TeacherService {
@Autowired
private TeacherDao teacherDao;
@Override
public Teacher save(Teacher teacher) {
return teacherDao.save(teacher);
} @Override
public void deleteById(Integer id) {
teacherDao.deleteById(id);
} @Override
public Teacher findById(Integer id) {
return teacherDao.findById(id).get();
} @Override
public Page<Teacher> listPager(Teacher teacher, PageBean pageBean) {
// jpa的Pageable分页是从0页码开始
Pageable pageable = PageRequest.of(pageBean.getPage()-, pageBean.getRows());
return teacherDao.findAll(new Specification<Teacher>() {
@Override
public Predicate toPredicate(Root<Teacher> root, CriteriaQuery<?> criteriaQuery, CriteriaBuilder criteriaBuilder) {
Predicate predicate = criteriaBuilder.conjunction();
if(teacher != null){
if(StringUtils.isNotBlank(teacher.getTname())){
predicate.getExpressions().add(criteriaBuilder.like(root.get("tname"),"%"+teacher.getTname()+"%"));
}
}
return predicate;
}
},pageable);
}
}
dao方法
package com.jt.springboot03.repository; import com.jt.springboot03.entity.Teacher;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor; /**
* 只要继承JpaRepository,通常所用的增删查改方法都有
* 第一个参数:操作的实体类
* 第二个参数:实体类对应数据表的主键
*
* 要使用高级查询必须继承
* org.springframework.data.jpa.repository.JpaSpecificationExecutor<T>接口
*/
public interface TeacherDao extends JpaRepository<Teacher, Integer>, JpaSpecificationExecutor<Teacher> {
}
controller
TeacherController
package com.jt.springboot03.controller; import com.jt.springboot03.entity.Teacher;
import com.jt.springboot03.service.TeacherService;
import com.jt.springboot03.utils.PageBean;
import com.jt.springboot03.utils.PageUtil; import com.jt.springboot03.utils.StringUtils;
import org.apache.commons.io.FileUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.IOException; @Controller
@RequestMapping("/teacher")
public class TeacherController {
@Autowired
private TeacherService teacherService; @RequestMapping("/listPager")
public ModelAndView list(Teacher teacher, HttpServletRequest request){
PageBean pageBean = new PageBean();
pageBean.setRequest(request);
ModelAndView modelAndView = new ModelAndView();
Page<Teacher> teachers = teacherService.listPager(teacher, pageBean);
modelAndView.addObject("teachers",teachers.getContent());
pageBean.setTotal(teachers.getTotalElements()+"");
modelAndView.addObject("pageCode", PageUtil.createPageCode(pageBean)/*.replaceAll("<","<").replaceAll(">:",">")*/);
modelAndView.setViewName("list");
return modelAndView;
} @RequestMapping("/toEdit")
public ModelAndView toEdit(Teacher teacher){
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("edit");
modelAndView.addObject("sexArr",new String[]{"男","女"});
if(!(teacher.getTid() == null || "".equals(teacher.getTid()))) {
Teacher t = teacherService.findById(teacher.getTid());
modelAndView.addObject("teacher", t);
}
return modelAndView;
} @RequestMapping("/add")
public String add(Teacher teacher, MultipartFile image){
try {
String diskPath = "E://temp/"+image.getOriginalFilename();
String serverPath = "/uploadImages/"+image.getOriginalFilename();
if(StringUtils.isNotBlank(image.getOriginalFilename())){
FileUtils.copyInputStreamToFile(image.getInputStream(),new File(diskPath));
teacher.setImagePath(serverPath);
}
teacherService.save(teacher);
} catch (IOException e) {
e.printStackTrace();
}
return "redirect:/teacher/listPager";
} @RequestMapping("/edit")
public String edit(Teacher teacher, MultipartFile image){
String diskPath = "E://temp/"+image.getOriginalFilename();
String serverPath = "/uploadImages/"+image.getOriginalFilename();
if(StringUtils.isNotBlank(image.getOriginalFilename())){
try {
FileUtils.copyInputStreamToFile(image.getInputStream(),new File(diskPath));
teacher.setImagePath(serverPath);
} catch (IOException e) {
e.printStackTrace();
}
}
teacherService.save(teacher);
return "redirect:/teacher/listPager";
} @RequestMapping("/del/{bid}")
public String del(@PathVariable(value = "bid") Integer bid){
teacherService.deleteById(bid);
return "redirect:/teacher/listPager";
}
}
------------恢复内容结束------------
springboot之jpa的支持的更多相关文章
- springboot对JPA的支持
springboot之jpa支持 导入相关pom依赖 <dependency> <groupId>org.springframework.boot</groupId> ...
- Springboot对JPA的支持及使用
目的: 1.springboot之jpa支持 2.Springboot+bootstrap界面版之增删改查及图片上传 springboot之jpa支持 导入相关pom依赖 <dependency ...
- Springboot+Atomikos+Jpa+Mysql实现JTA分布式事务
1 前言 之前整理了一个spring+jotm实现的分布式事务实现,但是听说spring3.X后不再支持jotm了,jotm也有好几年没更新了,所以今天整理springboot+Atomikos+jp ...
- Springboot+MyBatis+JPA集成
1.前言 Springboot最近可谓是非常的火,本人也在项目中尝到了甜头.之前一直使用Springboot+JPA,用了一段时间发现JPA不是太灵活,也有可能是我不精通JPA,总之为了多学学Sp ...
- 第11章—使用对象关系映射持久化数据—SpringBoot+SpringData+Jpa进行查询修改数据库
SpringBoot+SpringData+Jpa进行查询修改数据库 JPA由EJB 3.0软件专家组开发,作为JSR-220实现的一部分.但它又不限于EJB 3.0,你可以在Web应用.甚至桌面应用 ...
- 集成Springboot+MyBatis+JPA
1.前言 Springboot最近可谓是非常的火,本人也在项目中尝到了甜头.之前一直使用Springboot+JPA,用了一段时间发现JPA不是太灵活,也有可能是我不精通JPA,总之为了多学学Spri ...
- SpringBoot Data JPA 关联表查询的方法
SpringBoot Data JPA实现 一对多.多对一关联表查询 开发环境 IDEA 2017.1 Java1.8 SpringBoot 2.0 MySQL 5.X 功能需求 通过关联关系查询商店 ...
- SpringBoot中JPA的学习
SpringBoot中JPA的学习 准备环境和项目配置 写一下学习JPA的过程,主要是结合之前SpringBoot + Vue的项目和网上的博客学习一下. 首先,需要配置一下maven文件,有这么两个 ...
- SpringBoot数据访问(二) SpringBoot整合JPA
JPA简介 Spring Data JPA是Spring Data大家族的一部分,它可以轻松实现基于JPA的存储库.该模块用于增强支持基于JPA的数据访问层,它使我们可以更加容易地构建使用数据访问技术 ...
随机推荐
- markdownPad在win10下渲染报错问题
今天使用MarkdownPad 2,打开后发现预览效果出错了,本来以为自己下载了破解版的缘故导致软件不稳定,后来查找了网上,发现这是一个普遍的问题,根据软件的提示来到官方FAQ页面,找到解决方法. 实 ...
- 布隆过滤器的demo
/** * 缓存击穿 * @author * */ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = ...
- linux自定义开机欢迎页面图案
1:编辑etc目录下motd文件 佛祖图案 [root@host1 ~]# vim /etc/motd _oo0oo_ 088888880 88" . "88 (| -_- |) ...
- CCF-CSP题解 201509-3 模板生成系统
简单的替换一下字符串. 注意数组开大点. #include<bits/stdc++.h> const int maxm = 100; const int maxn = 100; using ...
- 牛客练习赛34 little w and Segment Coverage (差分区间)
链接:https://ac.nowcoder.com/acm/contest/297/C来源:牛客网 题目描述 小w有m条线段,编号为1到m. 用这些线段覆盖数轴上的n个点,编号为1到n. 第i条线段 ...
- 阿里云linux镜像发布web项目时候 tomcat与域名映射
tomcat 与 域名映射 一 准备工作: 阿里云服务器Linux镜像 及 域名备案和将域名解析至服务器,通过<暂不说,网上一大把或者参考阿里官方实例手册> 在Linux镜像中安装tom ...
- JVM 学习笔记一 :JVM类加载机制
前言: 最近在看JVM相关资料,这里记录下学习笔记,希望自己能坚持学完,打牢基础. 一.类加载过程 1,类从被加载到JVM中开始,到卸载为止,整个生命周期包括:加载.验证.准备.解析.初始化.使用 ...
- SuperMap iDesktop .NET 10i制图技巧-----如何贴图
当我们在没有模型数据的情况下,我们只能通过造白膜来模拟三维建筑了,但是光秃秃的建筑物显然缺乏代入感,因此需要贴图来给场景润色,本文介绍如何给道路贴图和如何给白膜贴图 道路贴图: 1.打开二维道路数据 ...
- PMBOK 指南 第三章 项目经理的角色
项目经理的角色 3.1 概述 项目经理类似于交响乐团的指挥 成员与角色 在团队中的职责 知识和技能:具备项目管理知识.技术知识.理解和经验. 3.2 定义 项目经理是由执行组织委派,领导团队实现项目目 ...
- mongodb-API
mongodb-API 连接mongo(该操作一般在初始化时就执行) 出现 由于目标计算机积极拒绝,无法连接的错误时 查看是否进行虚拟机的端口转发 将 /etc/ 目录下的mongodb.conf 文 ...