spring-boot-starter-logging和spring-boot-starter-web

【Spring Boot】Spring Boot的系统配置 — 日志配置 Spring Boot自带spring-boot-starter-logging库实现系统日志功能,spring-boot-starter-logging组件默认使用LogBack日志记录工具。系统运行日志默认输出到控制台,也能输出到文件中。下面通过示例来演示Spring Boot项目配置日志的功能。修改pom.xml文件,添加spring-boot-starter-logging依赖。启动项目,查看控制台的日志输出情况,如图所示。 阅读详情

本节主要讲解 spring-boot-starter-logging 和 spring-boot-starter-web 两个常见通用的 spring-boot-starter 模块。

应用日志和spring-boot-starter-logging

Java 的日志系统多种多样,从 java.util 默认提供的日志支持,到 log4j,log4j2,commons logging 等,复杂繁多,所以,应用日志系统的配置就会比较特殊,从而 spring-boot-starter-logging 也比较特殊一些,下面将其作为我们第一个了解的自动配置依赖模块。


假如 maven 依赖中添加了 spring-boot-starter-logging,如以下代码所示:

<dependency>
    <groupId> org.springframework.boot </groupId>
    <artifactId> spring-boot-starter-logging </artifactId>
</dependency>

那么,我们的 SpringBoot 应用将自动使用 logback 作为应用日志框架,SpringBoot 启动的时候,由 org.springframework.boot.logging.Logging-Application-Listener 根据情况初始化并使用。

SpringBoot 为我们提供了很多默认的日志配置,所以,只要将 spring-boot-starter-logging 作为依赖加入到当前应用的 classpath,则“开箱即用”,不需要做任何多余的配置,但假设我们要对默认 SpringBoot 提供的应用日志设定做调整,则可以通过几种方式进行配置调整:

  • 遵循 logback 的约定,在 classpath 中使用自己定制的 logback.xml 配置文件。
  • 在文件系统中任何一个位置提供自己的 logback.xml 配置文件,然后通过 logging.config 配置项指向这个配置文件来启用它,比如在 application.properties 中指定如下的配置。
logging.config=/{some.path.you.defined}/any-logfile-name-I-like.log


SpringBoot 默认允许我们通过在配置文件或者命令行等方式使用 logging.file 和 logging.path 来自定义日志文件的名称和存放路径,不过,这只是允许我们在 SpringBoot 框架预先定义的默认日志系统设定的基础上做有限的设置,如果我们希望更灵活的配置,最好通过框架特定的配置方式提供相应的配置文件,然后通过 logging.config 来启用。

如果大家更习惯使用 log4j 或者 log4j2,那么也可以采用类似的方式将它们对应的 spring-boot-starter 依赖模块加到 Maven 依赖中即可:

<dependency>
    <groupId> org.springframework.boot </groupId>
    <artifactId> spring-boot-starter-log4j </artifactId>
</dependency>

或者

<dependency>
    <groupId> org.springframework.boot </groupId>
    <artifactId> spring-boot-starter-log4j2 </artifactId>
</dependency>


但一定不要将这些完成同一目的的 spring-boot-starter 都加到依赖中。

快速 Web 应用开发与 spring-boot-starter-web

在这个互联网时代,使用 Spring 框架除了开发少数的独立应用,大部分情况下实际上在使用 SpringMVC 开发 web 应用,为了帮我们简化快速搭建并开发一个 Web 项目,SpringBoot 为我们提供了 spring-boot-starter-web 自动配置模块。

只要将 spring-boot-starter-web 加入项目的 maven 依赖:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
</dependency>

我们就得到了一个直接可执行的 Web 应用,当前项目下运行 mvn spring-boot:run 就可以直接启动一个使用了嵌入式 tomcat 服务请求的 Web 应用,只不过,我们还没有提供任何服务 Web 请求的 Controller,所以,访问任何路径都会返回一个 SpringBoot 默认提供的错误页面(一般称其为 whitelabel error page),我们可以在当前项目下新建一个服务根路径 Web 请求的 Controller 实现:

@RestController
public class IndexController {
    @RequestMapping("/")
    public String index() {
        return "hello, there";
    }
}

重新运行 mvn spring-boot:run 并访问 http://localhost:8080,错误页面将被我们的 Controller 返回的消息所替代,一个简单的 Web 应用就这样完成了。

但是,简单的背后,其实却有很多“潜规则”(约定),我们只有充分了解了这些“潜规则”,才能更好地应用 spring-boot-starter-web。

项目结构层面的约定

项目结构层面与传统打包为 war 的 Java Web 应用的差异在于,静态文件和页面模板的存放位置变了,原来是放在 src/main/webapp 目录下的一系列资源,现在都统一放在 src/main/resources 相应子目录下,比如:

  • src/main/resources/static 用于存放各类静态资源,比如 css,js 等。
  • src/main/resources/templates 用于存放模板文件,比如 *.vm。


当然,如果还是希望以 war 包的形式,而不是 SpringBoot 推荐使用的独立 jar 包形式发布 Web 应用,也可以继续原来 Java Web 应用的项目结构约定。

SpringMVC 框架层面的约定和定制

spring-boot-starter-web 默认将为我们自动配置如下一些 SpringMVC 必要组件:

  • 必要的 ViewResolver,比如 ContentNegotiatingViewResolver 和 Bean-NameViewResolver。
  • 将必要的 Converter、GenericConverter 和 Formatter 等 bean 注册到 IoC 容器。
  • 添加一系列的 HttpMessageConverter 以便支持对 Web 请求和相应的类型转换。
  • 自动配置和注册 MessageCodesResolver。
  • 其他。


任何时候,如果我们对默认提供的 SpringMVC 组件设定不满意,都可以在 IoC 容器中注册新的同类型的 bean 定义来替换,或者直接提供一个基于 WebMvcConfigurerAdapter 类型的 bean 定义来定制,甚至直接提供一个标注了 @EnableWebMvc 的 @Configuration 配置类完全接管所有 SpringMVC 的相关配置,自己完全重新配置。

 

spring-boot-starter-logging:日志组件 spring-boot-starter-logging 日志组件 为spring项目提供日志功能 spring项目均需要依赖该项目 立即下载

相关推荐

Python与numpy版本兼容性排查指南

本文详细解析了Python与numpy版本兼容性问题,提供了快速诊断和解决版本冲突的实用方法。通过查看版本信息、使用官方兼容性对照表以及降级或升级环境等方案,帮助开发者有效避免常见的报错问题,如'ImportError'和'AttributeError'。文章还介绍了使用虚拟环境和requirements.txt等工程实践,确保项目依赖的稳定性。

weixin_29089057的博客 318

SpringBoot揭密:spring-boot-starter-logging及源码解析

SpringBoot源码中使用的日志API为JCL(Java common log),JCL实际上只是一个日志门面,没有具体的日志功能实现。如果将SpringBoot中的spring-boot-start-logging依赖排除,可以看到启动项目时打印的是红色字体的JUL日志。 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>sprin...

zhangweiocp的专栏 4383

CELF(Cost-Effective Lazy Forward selection)具有成本效益的惰性前向选择算法

CELF(Cost-Effective Lazy Forward selection)算法解析      引言:在社交网络影响力最大化问题的求解过程中,我们往往需要去选择一些目标种子结点作为信息初始传播的源头。贪婪算法在传播效果上的解决可以达到影响的最大化,但是在时间复杂度上面显得确十分糟糕。为此CELF算法应势而生,CELF算法利用了函数次模性的特点,在第一轮选择种子结点时,计算网络中所有节点的边际收益,但将在之后的过程中,不再做网络节点边际收益的重复计算,这相对于传统的贪婪算法,将在时间上得到非常明显的

hahaxq的博客 2476

SpringBoot-04 | spring-boot-starter-logging原理原理

SpringBoot启动的时候会读取spring-boot-2.2.0.jar里面的spring.factories,拿到所有的ApplicationListener(有很多个,其中包括了LoggingApplicationListener)和SpringApplicationRunListener(只有一个,EventPublishingRunListener,它里面会使用了Spring的SimpleApplicationEventMulticaster做事件发布)。

qiushily2030的博客 2969

通过薄膜太阳能电池中的热激电流量化陷阱状态

发光(led)和光伏(PV)器件的性能取决于光活性半导体材料的质量。由于材料杂质或在制造过程中在半导体材料中无意地引入缺陷,导致偏离最佳性能。这些缺陷被称为阱态,或简称“阱”,它是半导体带隙内的高能态。一般来说,陷阱的发生可能是由于材料杂质(在散装)或在不同材料层之间的界面。在有机半导体中,由于天然物质的无序性,阱态经常出现。在无机和杂化半导体(例如:杂化钙钛矿、硅……)中,晶界的存在是圈闭态的已知来源。由于陷阱产生的原因多种多样,它们对装置的影响也是多种多样的。由于载流子的多次捕获和释放事件,特别是浅阱的

FluximAG的博客 2848

NFS共享速度慢?麒麟系统性能调优5个关键参数实测对比

本文针对银河麒麟服务器系统上NFS共享速度慢的问题,通过实测对比分析了五个关键调优参数。重点探讨了rsize/wsize传输块大小、TCP/UDP协议选择、sync/async模式权衡等,并结合麒麟系统特性提供了具体的优化建议与配置示例,旨在帮助用户有效提升国产化环境下的文件共享性能。

weixin_29254029的博客 332

spring-boot-starter-logging 的使用

日志框架的使用 spring-boot-starter-logging Java中可以提供日志功能的特别多,从 java.util 默认提供的日志支持,到 log4j,log4j2,commons logging 等,但我一般比较喜欢西永logback,下面我们看下springboot中logback如何配置。 在springboot项目中 ,只需要在 maven 依赖pom.xmlzhong 添加了 spring-boot-starter-logging,如以下代码所示: <dependency&g

qq_23917873的博客 9078

cadence数模混合仿真反标sdf

数模混合IC设计时经常要调用一些Verilog模块(最简单的例如SPI接口),在前仿时一般直接用rtl代码来仿真,但是后仿时要关注因寄生带来的延迟,避免这些额外的延迟导致时序错误,因此不能简单地采用RTL来仿真。 一般有两种办法:1是采用由RTL综合得到的门级电路来仿真,这种方法比较简单,但是缺点是规模较大,而且只包括门延迟不包括因版图导致的线延迟;如果想要仿真更精细,就要对该这部分门电路提取寄生参数; 另一种方式是利用sdf文件(standard delay format)来进行仿真。后端工具在布局布

长河柱天的博客 7273

简单介绍一下 : spring-boot-starter-logging和spring-boot-starter-web

应用日志和spring-boot-starter-logging Java的日志系统多种多样,从 java.util 默认提供的日志支持,到 log4j,log4j2,commons logging 等,复杂繁多,所以,应用日志系统的配置就会比较特殊,从而 spring-boot-starter-logging 也比较特殊一些,下面将其作为我们第一个了解的自动配置依赖模块。 假如 maven 依赖中添加了 spring-boot-starter-logging,如以下代码所示: <depende

段远山 1415

Leads、SDR、MQL、SQL、L2C术语概念,线索创建与清洗、线索分级模型、线索流转策略、线索的统计与分析

CRM中的“Leads”是什么?笔者在文中不仅较为全面地介绍了相关术语概念,还分析了线索的创建与清洗、线索的分级模型、线索流转策略以及线索的统计与分析。

盼盼学士 5954

手把手教你学Simulink--基于飞行控制与稳定性的场景实例:固定翼无人机的自动起飞与降落控制

本文介绍了使用Simulink对固定翼无人机自动起飞与降落控制系统进行建模与仿真的完整流程。首先构建了包含飞行器动力学模型、控制系统、环境模拟等模块的系统结构,详细阐述了简化动力学方程的推导和实现。重点讲解了PID控制器设计,包括起飞阶段的速度控制和降落阶段的高度控制策略。通过添加环境干扰和输入信号,建立了完整的仿真模型,并利用输出显示模块评估系统性能。该实例为无人机自主控制系统的开发提供了有效的仿真验证方法,有助于优化参数提高飞行稳定性。

MHD0815的博客 4308

springboot微服务--04 spring-boot-starter-logging和spirng-boot-starter-web

了解 spring-boot-starter 应用日志和 spring-boot-starter-logging web应用开发与spirng-boot-stater-web 项目结构层面约定 了解 spring-boot-starter springboot微框架从两个层面影响微服务开发者: 基于spring框架的“约定优先于配置”理念 提供了丰富的spring...

头脑存档处 5833

YOLO与ORB-SLAM3的结合:实现动态环境下的目标检测与视觉SLAM

摘要: 本文介绍如何将YOLOv5目标检测与ORB-SLAM3视觉SLAM系统结合,实现动态环境下的机器人感知与定位。内容包括:源码下载(集成项目YOLO_ORB_SLAM3)、libtorch安装(PyTorch C++支持)、编译配置(解决路径依赖问题)、ROS环境下的部署(Noetic适配),以及使用TUM数据集的测试流程(RGB-D数据关联与运行)。重点解决编译时Torch路径错误、ROS与Anaconda冲突等问题,并展示系统运行效果。该整合方案为动态场景SLAM提供目标检测能力,未来可优化检测模

FJN110的博客 960

Spring-boot-starter常用依赖模块

Spring-boot的2大优点: 1.基于Spring框架的“约定优先于配置(COC)”理念以及最佳实践之路。 2.针对日常企业应用研发各种场景的Spring-boot-starter自动配置依赖模块,且“开箱即用”(约定spring-boot-starter- 作为命名前缀,都位于org.springframenwork.boot包或者命名空间下)。 spring-boot-starte...

wqh0830的博客 1499

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Camera2Demo

在Camera2 的基础上进行封装,使得Camera2一堆初始化逻辑与Activity分离,降低耦合度,完成预览拍照并保存的操作

Spring-Boot-Starter常用依赖模块详解

一般认为,SpringBoot 微框架从两个主要层面影响 Spring社区的开发者们: 基于 Spring 框架的“约定优先于配置(COC)”理念以及最佳实践之路。 提供了针对日常企业应用研发各种场景的 spring-boot-starter 自动配置依赖模块,如此多“开箱即用”的依赖模块,使得开发各种场景的 Spring 应用更加快速和高效。 SpringBoot 提供的这些“开箱即用”的...

javaheheda的博客 1029

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

纷杂的spring-boot-starter

纷杂的spring-boot-starter简述应用日志和spring-boot-starter-logging快速Web应用开发与spring-boot-starter-web项目结构层面的约定SpringMVC框架层面的约定和定制嵌入式Web容器层面的约定和定制数据访问与spring-boot-starter-jdbcSpringBoot应用的数据库版本化管理 简述 1)基于Spring框架的“约定优先于配置(COC)”理念以及最佳实践之路。 2)提供了针对日常企业应用研发各种场景的spring-boo

574

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

spring-boot-starter大力出奇迹

一、前言 ​  上篇文章我们已经聊了SpringBoot的启动过程中的各类扩展点,那么从http://start.spring.io上我们生成的demo项目中,到目前就剩下了maven工程的pom.xml还没有进行探索了,那么本文我们就来看看这里面到底都有啥,把大力出奇迹的常见spring-boot-starter来聊一聊,以便更好地使用SpringBoot. 二、SpringBoot项目...

weixin_33843409的博客 92

Spring Boot2 入门(一)知识简介

Spring Boot2 入门(一)知识简介 1.1 Spring 简介     Spring 框架由 Rod Johnson 开发,是一个轻量级的企业级开发一站式解决方法。Spring 是一个从实际开发中抽取出来的框架,因此它完成了大量开发中的通用步骤,从而大大提高了企业应用的开发效率。     Spring 提供了...

因为喜爱,所以努力 299

spring boot 日志错误:org.hibernate.validator.internal.engine.ConfigurationImpl

<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <exclusions> <exclusion> ...

yangwy012210的博客 2982

Logging system failed to initialize using configuration from ‘classpath:log4j2-test.xml‘

- 去掉springboot默认配置 -->

wangqiaowq的博客 621

pom里面不要logback_在SpringBoot中禁用Logback-问答-阿里云开发者社区-阿里云

问题描述: LoggerFactory 不是Logback 的LoggerContext,但是Logback却会在classpath上。需要禁用掉Logback,猜测是pom中的引用出现了问题原来的pom文件如下:xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0...

weixin_39557797的博客 204

SpringBoot学习

SpringBoot 提供的这些“开箱即用”的依赖模块都约定以 spring-boot-starter- 作为命名的前缀, 并且皆位于 org.springframework.boot 包或者命名空间下 。 所有的 spring-boot-starter 都有约定俗成的默认配置,但允许我们调整这些配置以改变默认的配置行为, 即“约定优先于配置”。在介绍相应的 spring-boot-starter 的默认配置(约定)以及可调整配置之前, 我们有必要对 SpringBoot 应用的配置约定先做一个简单的介绍

ainilzb的博客 98

SpringBoot的起步依赖

SpringBoot的起步依赖等内容

qq_51325652的博客 1913

《SpringBoot揭秘 快速构建微服务体系》读后感(五)

《SpringBoot揭秘 快速构建微服务体系》读后感(五)     应用日志和spring-boot-starter-logging 快速web应用开发与spring-boot-starter-web 1、项目结构层面的约定     ...

哎呀妈呀脑壳疼脑壳疼 173

springboot - 应用实践(1)认识springboot

1、为什么要推出springboot springboot设计的目的是用来简化新spring应用的初始搭建以及开发过程。springboot遵循“约定优于配置”原则。 2、springboot默认的配置文件application.properties 3、日志依赖模块spring-boot-starter-logging,自动使用的是logback作为项目的日志框架 &l...

weixin_30409849的博客 207
上一篇: Spring-Boot-Starter常用依赖模块详解
下一篇: spring-boot-starter-security与应用安全
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值