上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 26 下一页
摘要: mybatis:半自动化的持久化层框架,灵活,学习成本低,便利的SQL操作,自由度高,封装性好 hibernate:有良好的映射机制,开发者无需关心SQL的生成与结果映射,可以更专注于业务流程 JPA:Java持久层API,是一种ORM规范,javax.persistence.* 阅读全文
posted @ 2021-08-03 09:38 未来可期_Durant 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 选择mybatis的原因 springboot自动配置相关依赖 方便数据库操作的依赖 数据库连接的依赖 maven依赖 <!-- https://mvnrepository.com/artifact/org.mybatis.spring.boot/mybatis-spring-boot-starte 阅读全文
posted @ 2021-08-02 22:58 未来可期_Durant 阅读(724) 评论(0) 推荐(1) 编辑
摘要: 一、什么是跨域 浏览器从一个域名的网页去请求另一个域名的资源时,域名、端口、协议任一不同,都是跨域 域名: 主域名不同 http://www.baidu.com/index.html -->http://www.sina.com/test.js 子域名不同 http://www.666.baidu. 阅读全文
posted @ 2021-08-02 11:04 未来可期_Durant 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 一、设置步骤 File -> Settings -> Editor -> Inspections -> 搜索 Serialization issues ,找到 Serializable class without 'serialVersionUID' ->打上勾,Apply->OK 二、新建文件 p 阅读全文
posted @ 2021-08-01 23:02 未来可期_Durant 阅读(864) 评论(0) 推荐(0) 编辑
摘要: 代码定义 package com.example.demo.common; public class ServiceException extends RuntimeException { private static final long seriaVersionUID = 1L; private 阅读全文
posted @ 2021-07-29 00:24 未来可期_Durant 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 前言 SpringBoot的默认配置文件格式是.properities,同时也支持***.yaml或***.yml 1、指定启动的环境 spring: profiles: active: dev 2、给springboot服务命名(配合springcloud时非常有用) spring: applic 阅读全文
posted @ 2021-07-28 23:48 未来可期_Durant 阅读(44) 评论(0) 推荐(0) 编辑
摘要: 一、idea配置文件 application.yml spring: profiles: active: dev application-dev.yml server: port: 8081 application-test.yml server: port: 8082 application-ua 阅读全文
posted @ 2021-07-28 23:14 未来可期_Durant 阅读(76) 评论(0) 推荐(0) 编辑
摘要: Componment:声明为springboot的bean Repository:用于dao层的bean Autowired:用于向一个bean注入其他的bean Service:用于service层的bean Configuration:用于声明springboot的配置文件类 Value("${ 阅读全文
posted @ 2021-07-26 23:11 未来可期_Durant 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 一、检查pom文件是否有打jar包的插件 二、把springboot服务打成jar包 mvn clean install -U -DskipTests 三、使用命令行启动springboot服务 java -jar demo-0.0.1-SNAPSHOT.jar 阅读全文
posted @ 2021-07-26 22:57 未来可期_Durant 阅读(191) 评论(0) 推荐(0) 编辑
摘要: SpringBootApplication:springboot主类,用来加载springboot各种特性 RsetController:Spring会转换返回值并自动将其写入HTTP响应 RequestMapping:用于类和方法,在方法级别时,用于处理HTTP的各种方法 RequestBody: 阅读全文
posted @ 2021-07-25 18:45 未来可期_Durant 阅读(123) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 26 下一页