求助:spring· boot 使用log4j报错,去除重复就报以下错误,不去重就提示包重复,tomcat也起不来
log4j:WARN No appenders could be found for logger (org.springframework.web.context.support.StandardServletEnvironment).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.10.RELEASE)
[2019-05-07 22:53:30.924] - 13452 信息 [main] --- org.apache.catalina.core.StandardService: Starting service [Tomcat]
[2019-05-07 22:53:30.928] - 13452 信息 [main] --- org.apache.catalina.core.StandardEngine: Starting Servlet Engine: Apache Tomcat/8.5.27
[2019-05-07 22:53:31.104] - 13452 信息 [localhost-startStop-1] --- org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/]: Initializing Spring embedded WebApplicationContext
[2019-05-07 22:53:31.617] - 13452 信息 [main] --- org.apache.catalina.core.StandardService: Stopping service [Tomcat]去除包操作为
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<artifactId>logback-classic</artifactId>
<groupId>ch.qos.logback</groupId>
</exclusion>
<exclusion>
<artifactId>log4j-over-slf4j</artifactId>
<groupId>org.slf4j</groupId>
</exclusion>
</exclusions>
</dependency>
...全文
相关推荐
spring所需的日志jar文件
spring开发,或者tomcat开发中需要添加日志包,此中包含了 common-logging.jar,log4j-1.2.17.jar, log4j-core-2.2.jar 众多jar包。
SLF4J与Log4j2集成原理及生产级日志配置实战
日志框架是Java应用可观测性的基石,SLF4J作为统一门面接口,通过桥接器(binding)解耦日志API与具体实现,实现面向接口编程;Log4j2则凭借Disruptor异步架构、零GC对象复用和复合滚动策略,提供高性能、高可靠日志能力。其技术价值在于保障开发阶段的API稳定性与生产环境的I/O吞吐、磁盘可控、内存安全三重底线。典型应用场景涵盖微服务全链路追踪(MDC)、多环境差异化输出(Console/rolling)、敏感信息动态脱敏(StrLookup),以及Spring Boot等主流框架的日志
IDEA下springboot+mybatis+log4j
解压完用idea打开,数据库和实体类需要自己去改,逆向工程也有
product-spring-boot:基于Spring Boot构建的产品微服务示例
产品微服务示例 使用Spring Boot和一系列工具和框架进行开发的产品微服务示例,展示了自动化测试,构建和部署(CI / CD)的最佳实践。 技术领域
Java spring boot 框架通用模板
Java spring boot 框架通用模板


