GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - codeflayer/springboot-learning-example: spring boot 实践学习案例,是 spring boot 初学者及核心技术巩固的最佳实践。

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

92 Commits
92 Commits

Folders and files

NameName
Last commit message
Last commit date
chapter-2-spring-boot-quick-start
chapter-2-spring-boot-quick-start
 
 
chapter-4-spring-boot-validating-form-input
chapter-4-spring-boot-validating-form-input
 
 
chapter-5-spring-boot-paging-sorting
chapter-5-spring-boot-paging-sorting
 
 
doc
doc
 
 
spring-data-elasticsearch-crud
spring-data-elasticsearch-crud
 
 
spring-data-elasticsearch-query
spring-data-elasticsearch-query
 
 
springboot-configuration
springboot-configuration
 
 
springboot-dubbo-client
springboot-dubbo-client
 
 
springboot-dubbo-server
springboot-dubbo-server
 
 
springboot-elasticsearch
springboot-elasticsearch
 
 
springboot-freemarker
springboot-freemarker
 
 
springboot-helloworld
springboot-helloworld
 
 
springboot-mybatis-annotation
springboot-mybatis-annotation
 
 
springboot-mybatis-mutil-datasource
springboot-mybatis-mutil-datasource
 
 
springboot-mybatis-redis-annotation
springboot-mybatis-redis-annotation
 
 
springboot-mybatis-redis
springboot-mybatis-redis
 
 
springboot-mybatis
springboot-mybatis
 
 
springboot-properties
springboot-properties
 
 
springboot-restful
springboot-restful
 
 
springboot-validation-over-json
springboot-validation-over-json
 
 
springboot-webflux
springboot-webflux
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
pom.xml
pom.xml
 
 

Repository files navigation

springboot-learning-example

spring boot 实践学习案例,是 spring boot 初学者及核心技术巩固的最佳实践。

推荐

  • 高性能 TCP/UDP 通信框架 HP-Socket
  • springcloud-learning-example spring cloud 实践学习案例
    https://github.com/JeffLi1993/springcloud-learning-example

Spring For All 社区

Spring For All 社区是新组建的关于 Spring 的纯技术交流社区(涵盖 Spring Boot、Spring Cloud 等内容),集诸多开源爱好者和技术大牛贡献内容和交流问题。我们不夸大、不装逼、做最纯粹的技术分享!!!

看看我们超强的群众基础,欢迎有兴趣的朋友加入QQ群分享与交流: Spring For All 社区 ⑪ 517395240
Spring For All 社区 ⑫ 498098401

博主微信:139-5868-6678

作者与学习乐园

源码地址:我的GitHub地址、OSCGit地址
作者:泥瓦匠BYSocket
关注微信公众号【泥瓦匠BYSokcet】,及时得到技术文章推送
公众号

一、项目结构

「Spring Boot 那些事」:传送门

a. 『 基础 - 入门篇 』

  • springboot-helloworld
    《Spring Boot 之 HelloWorld 详解》
  • springboot-properties
    《Spring Boot 之配置文件详解》

b. 『 基础 - Web 业务开发篇 』

  • springboot-restful
    《Springboot 实现 Restful 服务,基于 HTTP / JSON 传输》
    《Spring Boot 之 RESRful API 权限控制》
  • springboot-freemarker
    《Spring Boot 集成 FreeMarker 详解案例》
  • springboot-validation-over-json 《Spring Boot HTTP over JSON 的错误码异常处理》

c. 『 基础 – 数据存储篇 』

  • springboot-mybatis
    《Springboot 整合 Mybatis 的完整 Web 案例》
  • springboot-mybatis-annotation
    《Spring Boot 整合 Mybatis Annotation 注解的完整 Web 案例》
  • springboot-mybatis-mutil-datasource
    《Spring Boot 整合 Mybatis 实现 Druid 多数据源详解》

d. 『 基础 – 数据缓存篇 』

  • springboot-mybatis-redis
    《Spring Boot 整合 Redis 实现缓存操作》
  • springboot-mybatis-redis-annotation
    《Spring Boot 注解实现整合 Redis 作为缓存》

e. 『 其他篇 』

  • springboot-elasticsearch
    《Spring Boot 整合 Elasticsearch,实现 function score query 权重分查询》
  • springboot-dubbo-server
  • springboot-dubbo-client
    Dubbo 服务提供者工程和 Dubbo 服务消费者工程
    《Springboot 整合 Dubbo/ZooKeeper 详解 SOA 案例》
    《Spring Boot 中如何使用 Dubbo Activate 扩展点》

『 Spring Data ES 篇 』

  • spring-data-elasticsearch-crud
    《Spring Data Elasticsearch - 基本案例》
  • spring-data-elasticsearch-query
    spring-data-elasticsearch - 实战案例详解

二、项目 Quick Start 快速开发指南

a. 基本环境配置

在 MySQL 中,创建数据库 springbootdb:

CREATE DATABASE springbootdb;

创建表 city 城市 (因为我喜欢徒步)

DROP TABLE IF EXISTS  `city`;
CREATE TABLE `city` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '城市编号',
  `province_id` int(10) unsigned  NOT NULL COMMENT '省份编号',
  `city_name` varchar(25) DEFAULT NULL COMMENT '城市名称',
  `description` varchar(25) DEFAULT NULL COMMENT '描述',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;

插入基础数据

INSERT city VALUES (1 ,1,'温岭市','BYSocket 的家在温岭。');

《 springboot-mybatis 工程 Quick Start 》

首先 check 基本环境配置完成,创建好数据库和表。

1. 修改数据库配置

配置文件地址:springboot-mybatis/src/main/resources/application.properties 修改相应的数据源配置,比如账号、密码等

2. 编译工程

在项目根目录 springboot-learning-example,运行 maven 指令:

mvn clean install

3. 运行工程

右键运行工程包中 org.spring.springboot.Application Spring Boot 应用启动类的 main 函数,然后在浏览器访问:

http://localhost:8080/api/city?cityName=温岭市

可以看到返回的 JSON 结果:

{
    "id": 1,
    "provinceId": 1,
    "cityName": "温岭市",
    "description": "我的家在温岭。"
}

最后,

推荐 《Spring Boot教程与Spring Cloud教程》

About

spring boot 实践学习案例,是 spring boot 初学者及核心技术巩固的最佳实践。

Resources

Readme
Apache-2.0 license
Activity

Stars

1 star

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.