SpringBoot
闭关苦炼内功
微信公众号:码农coding
展开
-
分享微服务 springcloud 项目 部署 上线 shell 脚本
#!/usr/bin/env bashps -ef |grep demo-1.0-SNAPSHOT.jar |awk '{print $2}'|xargs kill -9nohup java -jar ./config/demo-1.0-SNAPSHOT.jar > ./logs/demo.log &tail -f ./logs/demo.log原创 2021-06-11 01:26:18 · 839 阅读 · 0 评论 -
SpringBoot入门整理
项目结构:包结构:先看主类,这是创建项目的时候就自动创建好的package com.example.demo;import org.mybatis.spring.annotation.MapperScan;import org.springframework.boot.SpringApplication;import org.springframework.boot....原创 2019-11-30 14:13:12 · 382 阅读 · 0 评论 -
SpringBoot之自动生成代码
使用IDEA,让SpringBoot自动生成代码废话不说了,下面直接上图:最新mysql数据库编码utf8mb4。继mysql 5.3之后,mysql数据库更新支持字符编码utf8mb4,就是utf8的扩展。注:mysql 5.3之前,mysql数据库支持字符编码utf8。...原创 2019-11-09 01:53:35 · 2322 阅读 · 1 评论 -
SpringBoot之 APPLICATION FAILED TO START 报错 (即配置连接MySQL数据库)
***************************APPLICATION FAILED TO START***************************Description:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could ...原创 2019-11-06 15:05:24 · 6978 阅读 · 0 评论 -
SpringBoot之Thymeleaf头html xmlns
<!-- Thymeleaf头 --><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"><!-- Thymeleaf头 --><!DOCTYPE html><ht...原创 2019-11-06 14:29:51 · 4810 阅读 · 0 评论 -
SpringBoot之musql数据库编码
applation.properties# mysql 数据库spring.datasource.url=jdbc:mysql://localhost:3306/user?useUnicode=true&characterEncoding=UTF-8&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=f...原创 2019-11-06 13:46:31 · 484 阅读 · 0 评论 -
SpringBoot之Thymeleaf头
applation.properties# Thymeleaf 编码spring.thymeleaf.encoding=UTF-8# 热部署静态文件spring.thymeleaf.cache=false# 使用HTML标准spring.thymeleaf.mode=HTML原创 2019-11-06 13:40:04 · 521 阅读 · 0 评论 -
彻底解决IDEA写SpringBoot定义的接口UserRepository extends CrudRepository爆红
直接上图:贴代码:public interface UserRepository extends CrudRepository<User,Long> {}搞不清楚就是爆红CrudRepository我是搜了一大堆,找了很多技术交流群,最后发现啊,还是自己搞吧;很多说CrudRepository是继承的Repository,于是乎如下骚操作:然后...原创 2019-11-06 09:50:07 · 3098 阅读 · 0 评论