上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 16 下一页
摘要: 一、配置文件加载 1、Controller中配置并指向文件 @Controller @PropertySource(value = { "application.properties" })//指定配置文件 2、在变量上打注解并指明配置文件中的key @Value("${web.upload.fil 阅读全文
posted @ 2020-07-01 22:55 o小兵o 阅读(1191) 评论(0) 推荐(0)
摘要: 1、引入热部署依赖包 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <optional>true</optional> </dependen 阅读全文
posted @ 2020-06-30 22:53 o小兵o 阅读(216) 评论(0) 推荐(0)
摘要: 1、静态文件 <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>文件上传</title> </head> <body> <form enctype="multipart/form-data" method="post" actio 阅读全文
posted @ 2020-06-29 23:03 o小兵o 阅读(10827) 评论(4) 推荐(0)
摘要: 1、目录 src/main/java :存放java代码 src/main/resources static:存放静态文件,比如css、js、image(访问方式 http://localhost:8080/js/main.js) templates:存放静态页面jsp,html,tpl confi 阅读全文
posted @ 2020-06-18 23:49 o小兵o 阅读(1017) 评论(0) 推荐(0)
摘要: 1. mongodb-driver是mongo官方推出的java连接mongoDB的驱动包,相当于JDBC驱动。 (1)通过maven仓库导入:https://mvnrepository.com/artifact/org.mongodb/mongodb-driver (2)官网中下载相应的java的 阅读全文
posted @ 2019-11-18 16:53 o小兵o 阅读(14879) 评论(3) 推荐(1)
摘要: 1.新建项目,项目中实战讲解注解作用 2.pom.xml依赖配置 <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> </properties> <parent> <groupId>org.s 阅读全文
posted @ 2019-11-10 20:56 o小兵o 阅读(482) 评论(1) 推荐(1)
摘要: 1、maven项目已完成状态! 2、maven打包前提pom.xml引入插件依赖 <build> <plugins> <plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptorRefs> <d 阅读全文
posted @ 2019-11-06 17:48 o小兵o 阅读(898) 评论(0) 推荐(1)
摘要: 1. springboot自动创建地址:https://start.spring.io/ 2.选择web(springMVC) 3.点击创建 4.创建成功 5.解压,导入项目 6.新建成功 7.原因 : maven的插件版本的问题,造成与IDE的不兼容 解决办法 :在pom中加上 <maven-ja 阅读全文
posted @ 2019-11-03 13:04 o小兵o 阅读(514) 评论(0) 推荐(0)
摘要: 1.打开Eclipse新建maven项目 2.导入maven依赖 <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.0 阅读全文
posted @ 2019-11-02 23:44 o小兵o 阅读(409) 评论(0) 推荐(0)
摘要: 1.mongodb入门命令 1.1 show databases; 或 show dbs; //查看当前的数据库 1.2 use databaseName 选择库 show tables/collections 查看当前库下的collections 1.3 如何创建库 mongodb 的库是隐式创建 阅读全文
posted @ 2019-09-07 11:54 o小兵o 阅读(27382) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 16 下一页