![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Spring Boot
爱的叹息
to be or not to be ,this is a question
展开
-
springboot的配置信息的设置和读取(application.properties/application.yml)
Springboot 自定义配置信息的设置和获取,两种方式@Value和@ConfigurationProperties原创 2023-11-12 20:39:29 · 347 阅读 · 0 评论 -
springboot和spring对比
大家都知道spring是大概2003年左右开始出现流行的,是一个轻量级的Java 开发框架,它是为了解决企业应用开发的复杂性而创建的。Spring 的核心是控制反转(IoC)和面向切面编程(AOP)。Spring 是可以在Java SE/EE 中使用的轻量级开源框架。原创 2023-11-09 01:11:38 · 133 阅读 · 0 评论 -
spring boot+maven快速开发restful的DEMO例子
【代码】spring boot+maven快速开发restful的DEMO例子。原创 2023-04-14 15:26:42 · 206 阅读 · 0 评论 -
spring boot restful服务的可执行jar用maven打包的一次完美记录
spring boot+maven打包可执行jar:jar命名+main方法类+引入第三方依赖的完整配置原创 2023-04-14 14:38:43 · 208 阅读 · 0 评论 -
springboot的rest服务配置服务的根路径
【代码】springboot的rest服务配置服务的根路径。原创 2023-04-14 11:10:17 · 422 阅读 · 0 评论 -
spring英文看不懂,试试这个及时更新的中文文档吧
SPRINGDOC.CN 提供最新的Spring Boot, Spring Cloud, Spring Security等Spring框架的官方中文文档。最近看到一个网站,对spring官网里面核心技术及时翻译,而且还整理了pdf,真的详细。没有套路,还好用,支持。Spring 中文文档。原创 2023-04-12 16:39:12 · 141 阅读 · 0 评论 -
代码版本M、RC、GA、Release等标识的区别
最近听说spring framework有了重大版本调整,出了6.0的GA版本了那GA是啥意思呢?看了下spring 官网和代码仓库,除了GA,还有M、RC、Release等。原创 2023-04-12 16:28:34 · 831 阅读 · 0 评论 -
thymeleaf的两种等效配置:配置文件和java类配置
thymeleaf的两种等效配置:配置文件和java类配置原创 2022-06-01 17:41:15 · 214 阅读 · 0 评论 -
springboot和thymeleaf,bootstrap集成简单例子
springboot和thymeleaf,bootstrap集成简单例子原创 2022-06-01 17:31:01 · 483 阅读 · 0 评论 -
验证spring默认是单例(singleton)还是多例(prototype)【结论:单例】
环境:IDEA,JDK8,mavenpom.xml<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 h原创 2022-05-19 11:31:20 · 456 阅读 · 0 评论 -
spring-jcl框架:日志
参考:(60条消息) Spring的日志模块-spring-jcl源码解析以及Java的日志框架_JianYangLiu的博客-CSDN博客https://blog.csdn.net/liujianyangbj/article/details/104990100#:~:text=Spring-jcl%20%E6%98%AF%20spring%20%E4%BD%93%E7%B3%BB%E4%B8%AD%E6%9E%81%E5%B0%91%E6%95%B0%E6%B2%A1%E6%9C%89%E4%BE%9D%原创 2022-05-18 14:12:33 · 676 阅读 · 0 评论 -
书籍《spring5 开发大全》相关内容
百度网盘下载地址链接:https://pan.baidu.com/s/15YP0c9_XM-ZMxfRLpRIFww?pwd=805t提取码:805t--来自百度网盘超级会员V6的分享相关代码地址https://github.com/waylau/spring-5-bookhttps://github.com/waylau/spring-5-book老卫(柳伟卫)的博客 - 关注编程、系统架构、性能优化| waylau.comhttps://waylau.com/...原创 2022-05-18 13:51:10 · 306 阅读 · 0 评论 -
Spring基于java注解方式注册javabean关键代码:AnnotationConfigApplicationContext
pom文件<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org原创 2022-05-18 10:24:33 · 186 阅读 · 0 评论 -
Spring框架的StandardEnvironment类
StandardEnvironment该类代码如下package org.springframework.core.env;public class StandardEnvironment extends AbstractEnvironment { public static final String SYSTEM_ENVIRONMENT_PROPERTY_SOURCE_NAME = "systemEnvironment"; public static final String S原创 2022-05-18 09:19:42 · 996 阅读 · 0 评论 -
导入spring boot父级依赖的两种方式
1、pom.xml文件中集成spring-boot-starter-parent<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.5.13</version> <relativePath/&..原创 2022-05-16 09:58:00 · 1657 阅读 · 0 评论 -
@SpringBootApplication注解分解描述
上图原创 2022-05-16 09:53:41 · 68 阅读 · 0 评论 -
使用spring boot开发基于rest的服务的两种方式
maven依赖<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/m原创 2022-05-16 09:51:51 · 259 阅读 · 0 评论 -
spring mvc开发javaweb遇到${pageContext.request.contextPath}不生效的问题
我的问题是版本太低导致的之前的springmvc-servlet.xml修改版本后<?xml version="1.0" encoding="UTF-8"?><web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmln.原创 2022-05-06 16:53:00 · 360 阅读 · 0 评论 -
Unable to start ServletWebServerApplicationContext due to missing ServletWebServerFactory bean
springboot集成thymeleaf报错如下:Connected to the target VM, address: '127.0.0.1:63511', transport: 'socket'15:31:27.839 [Thread-0] DEBUG org.springframework.boot.devtools.restart.classloader.RestartClassLoader - Created RestartClassLoader org.springframework原创 2022-04-29 15:38:16 · 290 阅读 · 0 评论 -
封装统一的json返回结果,包含状态信息,操作结果,返回值等示例
1、统一定义json结构package com.esoon.eda.web.model;import lombok.Data;@Datapublic class JsonResult<T> { private T data; private String code; private String msg; public JsonResult(){ this.code="0"; this.msg="操作成功!";原创 2022-04-07 08:59:19 · 2075 阅读 · 4 评论 -
springboot 默认的json处理框架Jackson对对象,list,map处理示例
1、spring boot默认的处理框架JackSon2、通用类:Userpackage com.esoon.eda.web.model;import lombok.AllArgsConstructor;import lombok.Data;import lombok.NoArgsConstructor;@Data@AllArgsConstructor@NoArgsConstructorpublic class User { private int id; p原创 2022-04-06 17:50:57 · 1576 阅读 · 0 评论 -
idea软件的 services窗口显示启动的服务
1、查看服务类型:spring boot2、显示services窗口:view——>tool windows——>services3、筛选显示spring boot类型的服务原创 2022-04-06 11:29:23 · 2442 阅读 · 0 评论 -
直接编码方式--实现BeanFactory的对象注册和依赖绑定方式
代码实现BeanFactory、BeanDefinitionRegistry以及DefaultListableBeanFactory的关系代码解释原创 2022-03-14 16:43:39 · 354 阅读 · 0 评论 -
Spring-IoC依赖注入,控制反转的xml文件方式生产bean的三种实现方式
目录1、BeanFactory+XmlBeanFactory2、ApplicationContext+ClassPathXmlApplicationContext3、ApplicationContext+FileSystemXmlApplicationContext1、BeanFactory+XmlBeanFactory2、ApplicationContext+ClassPathXmlApplicationContext3、ApplicationContext+Fi.原创 2022-03-14 15:57:09 · 623 阅读 · 0 评论 -
获取spring 框架源码方式
目录快速直达地址:1、必应搜索“spring”2、Projects——>Spring-Framework3、点击进入github链接地址4、 github拉到下面,找到“Access to Binaries”,点击“Spring Framework Artifacts”链接快速直达地址:Artifacts - repo.spring.iohttps://repo.spring.io/ui/repos/tree/General/1、必应搜索“spr...原创 2022-03-14 15:52:02 · 1353 阅读 · 0 评论 -
springboot项目报错 Command line is too long. Shorten command line for xxx or also for Spring Boot
java spring 项目启动时报错:Command line is too long. Shorten command line for xxxApplication or also for Spring Boot default configuration.这是命令行长度造成的错误,可以通过修改项目的命令行启动方式来解决:1、打开项目配置:2、在打开的配置窗口中选中启动时报错的项目:3、将项目的Shorten command line修改为cl...转载 2022-03-07 18:08:25 · 8150 阅读 · 0 评论 -
Cannot build artifact ‘test-web:war exploded‘ because it is included into a circular depen 解决方法
在idea运行之前的项目(tomcat中运行)时报如下错误Cannot build artifact 'test-web:war exploded' because it is included into a circular dependency (artifact 'test-web:war exploded', artifact 'test')在项目/.idea/artifacts下发现有两个文件名不一样,大小相同的文件,看错误就是这两个引起的,删除其中一个即可删除后结果.原创 2022-02-13 11:41:51 · 1257 阅读 · 0 评论 -
本地搭建博客的几种方式【附相关软件下载链接】
在公司有些技术文档由于涉密原因不方便对外公布,但是又需要把相关文档分享出来,此时可以在公司内部建立本地博客系统,方便内部人员访问下面介绍几种建立方式开源代码建立核心技术后端: SpringBoot+JPA+ thymeleaf 数据库:mysql 开发:idea+maven 前端:Semantic UI优秀的个人博客 全面实战(视频转载自网络)参考视频网站https://www.bilibili.com/video/BV1PE411f7gS?spm_id_from=333.1007.top.原创 2022-02-05 09:24:31 · 1063 阅读 · 0 评论 -
Idea 的spring boot 的maven项目添加热部署之后没生效的解决
如下图,在maven的依赖文件pom.xml引入开发环境的热部署依赖<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> </dependency>@RestControllerpublic class HelloController {原创 2022-01-08 17:40:20 · 1715 阅读 · 0 评论 -
srpingboot项目提示找不到application.propertie或者application.yml文件
解决办法1、查看配置文件中是否有多余的符号信息,例如application.yml文件后面的:后只能有一个空格,然后接内容2、查看文件的编码,最好统一,我遇到的就是项目设置的是UTF-8,复制拿过来的创建的确实gbk格式并且报错信息包含如下内容:Caused by: java.nio.charset.MalformedInputException: Input length = 1...原创 2021-03-20 18:08:01 · 826 阅读 · 0 评论 -
解决 java.lang.IllegalStateException: Malformed \uxxxx encoding.
报错之前application.properties配置如下file.upload.root.path=E:\idea_project\upload\报错如下:16:24:53.185 [main] ERROR org.springframework.boot.SpringApplication - Application run failedjava.lang.IllegalStateException: Malformed \uxxxx encoding....原创 2021-03-18 16:29:10 · 1264 阅读 · 0 评论 -
实现springboot多文件上传的最佳方案
一说明spingMVC支持文件上传,我们通过Apach 的 commons-fileupload 包的CommonsMultipartResolver 去实现了 spingMVC的MultipartResolver 。 本文章的示例是个简单的多文件上传,根据不同的业务自行修改。二pom.xlm<dependencies> <dependency> <groupId>commons-fileupload</gro.转载 2021-03-18 16:01:30 · 343 阅读 · 0 评论 -
通过oracle序列(sequence)获取自增值设置给字符串(String)类型的id引发的问题
我的一个表插入的时候是通过实时获取定义的序列(sequence)来拿到自增值的sequence定义的内容如下-- Create sequence create sequence SEQ_IDS_FILE_LISTminvalue 1maxvalue 999999999999start with 49increment by 1cache 20;mybatis的xml定义的插入语句如下 <insert id="insertIdsFileList" paramete.原创 2021-03-05 23:58:21 · 837 阅读 · 1 评论 -
spring boot 的web项目
spring boot web修改完类或者配置之后,通常需要重新部署之后才能生效,如果每次都手动运行非常不方便,,幸好spring boot提供了spring-boot-devtools,它能在修改类或者配置文件的时候自动重新加载spring boot应用,当然首先要在pom文件的dependencies标签里中添加如下依赖<dependency> <groupId>org.springframework.boot</groupId>原创 2021-02-23 11:03:35 · 406 阅读 · 0 评论 -
easyweb前端框架的资料
https://demo.easyweb.vip/iframe/https://eleadmin.com/doc/iframe/#/原创 2021-02-19 17:45:50 · 6453 阅读 · 4 评论 -
guns项目单体分离、单体不分离,微服务【三种】
https://www.stylefeng.cn/index#pricinghttps://doc.stylefeng.cn/原创 2021-02-19 17:36:25 · 663 阅读 · 0 评论 -
spring boot vue等前后端跨域请求时,后端代码设置允许跨域请求的代码配置
spring boot vue等前后端跨域请求时,后端代码设置允许跨域请求的代码配置原创 2020-12-20 12:38:45 · 207 阅读 · 1 评论 -
Spring Boot Actuator:健康检查、审计、统计和监控
Spring Boot Actuator可以帮助你监控和管理Spring Boot应用,比如健康检查、审计、统计和HTTP追踪等。所有的这些特性可以通过JMX或者HTTP endpoints来获得。Actuator同时还可以与外部应用监控系统整合,比如 Prometheus, Graphite, DataDog, Influx, Wavefront, New Relic等。这些系统提供了非常好的仪表盘、图标、分析和告警等功能,使得你可以通过统一的接口轻松的监控和管理你的应用。Actuator使用Mi转载 2020-11-19 14:25:01 · 720 阅读 · 0 评论 -
解决 Maven 无法下载 fastdfs-client-java 依赖。
因为fastdfs-client-java-1.27-SNAPSHOT.jar这个依赖包在maven中央仓库是没有的。需要自己编译源码成jar本地安装到maven 的本地仓库,安装完以后就能正常引用了(注意:本地必须安装了Maven,并配置好Maven环境变量)<dependency> <groupId>org.csource</groupId> <artifactId>fastdfs-client-java</arti转载 2020-07-19 08:50:19 · 449 阅读 · 1 评论 -
Thymeleaf 配置在spring boot中的常见配置
# THYMELEAF (ThymeleafAutoConfiguration) #开启模板缓存(默认值:true) spring.thymeleaf.cache=true #检查模板是否存在,然后再呈现 spring.thymeleaf.check-template=true #检查模板位置是否正确(默认值:true) spring.thymeleaf.check-template-location=true #Content-Type的值(默认值:text/html) ...原创 2020-07-18 22:12:53 · 750 阅读 · 0 评论