javascript
Spring Boot 入门 IDEA 版本 2小时学会springBoot 代码上传至gitee 或者github 事务没做出来
SpringBoot簡化了xml的配置可以快速開發,節省很多的時間,springboot的配置速度更快,SpringMvc已經不如springboot了,
市面上更多的是使用spingboot這個框架了。?
springboot是springmvc的升級版,但是2者沒有必然的聯系??梢灾苯訉W習springboot。
微服務當下大小公司都是在用的,非?;?#xff0c;
spingCloud是建立在springboot的基礎上的,spingcloud是為微服務打基礎的。
?
?
代碼上傳至gitee或者github
如果寫@value注解就要累死了
?
?
?
這種只要了解就好了? ? ? 現在都是前后端分離的? ? ?不會使用這種? ? ? 使用模板會對性能帶來很大的損耗。? 不推薦使用這種方式。
?
?
?
?
?
這里運行一直報錯? 是mysql包沒有引入
spring:profiles:active: dev#active: dev pro prod(無法啟動)datasource:driver-class-name: com.mysql.jdbc.Driverurl: jdbc:mysql://127.0.0.1:3306/dbgirl?useUnicode=true&characterEncoding=UTF-8&serverTimezone=GMT%2B8username: rootpassword: rootjpa:hibernate:ddl-auto: create //查詢一個女生 版本不一樣有時候不行的 @GetMapping(value = "/girls/{id}") public Girl girlFindOne(@PathVariable("id") Integer id){return girlRepository.findById(id).get(); }照著做沒做出了? ?事務這里? 也不知道為什么 ???? 有空問問胡玉海
找到原因了是? 數據庫不支持事務MyIsam? ?修改為InnoDB就可以了
?
?
代碼別忘了推送github上去!!!!!!!!!!!!
https://github.com/yangjiabinylg/girl? ? 推送成功了? 在github上面了
?
?
alter table girl type=InnoDB? --沒用
CREATE TABLE `girl` (
? `id` int(11) NOT NULL,
? `age` int(11) DEFAULT NULL,
? `cup_size` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
? PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
?
?
?
[SQL]CREATE TABLE `girl`(
`id` int(11) NOT NULL,
`age` int(11) DEFAULT NULL,
`cup_size` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
受影響的行: 0
時間: 1.166s
[Err] 1055 - Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated column 'information_schema.PROFILING.SEQ' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
?
總結
以上是生活随笔為你收集整理的Spring Boot 入门 IDEA 版本 2小时学会springBoot 代码上传至gitee 或者github 事务没做出来的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: h3c路由器质量(h3c路由器抗ddos
- 下一篇: 开锁行业备案(开锁业备案牌)