在我的Springboot 2.3.0应用程序中,我间歇地在日志文件中得到这个警告,并希望停止对它们进行日志记录。
我明白这只是一个警告,是可以忽略的。但是,是否有一个属性可以添加到application.properties中并停止在日志文件中记录这个属性。
To enforce a read only connection, set the read-only data source or connection property. ERRORCODE=4474, SQLSTATE=01000 ```
使用SpringBoot1.4和Logback,我在application.yml中配置了日志记录
logging:
level:
org.hibernate.SQL: INFO
com.netflix.eureka: OFF
注意,第二种配置的建议直接来自于文档。它对信息和其他“正常”级别非常有效。但是,日志也显示(由我重新格式化):
… o.s.cloud.logging.LoggingRebinder : Cannot set level: false for
'org.hibernate.engine.internal.Stat
我有SpringBoot1.4.0、HikariCP 2.4.7、slf4j-api 1.7.21和PostgreSQL JDBC 9.4.1208。
我希望看到PostgreSQL JDBC的调试日志,因为我有和HikariCP:
HikariPool-1 - Connection is not available, request timed out after 42734ms.
如何启用调试日志记录以查看发生了什么?
我试过:
-Adding:
org.postgresql.Driver.setLogLevel(Driver.DEBUG);
hikariDataSource = new
我尝试使用logging.file.name=springboot.log来设置我的日志文件,但是没有日志文件被写入。但让人非常困惑的是springboot.txt是如何工作的。以下是我在application.properties中的设置
logging.level.com.demo=trace
# For the following files, I just keep one and comment the others
logging.file.name=springboot.yml # Works
logging.file.name=springboot.xml # Wor
我有一个简单的SpringBoot应用程序。在日志和使用LocalDateTime.now()上显示错误的时间戳,比系统(Ubuntu)默认值多1小时。在日志记录时间戳中是:
2020-11-26 14:46:00,584 INFO [scheduling-1]....
同时也上了print LocalDateTime。但是,系统时间是不同的:
$ date
qui nov 26 13:50:13 -03 2020
那么,如何将应用程序设置为从系统获取正确的时间呢?
我正在寻找最简单的方法来记录源自我的java springboot微服务的redis活动(查询和响应)。
每当从redis中提取数据/将数据插入redis时,我都希望看到(在主springboot日志文件中)日志行。
我的代码使用典型的spingframework data redis方法,如下所示:
import org.springframework.data.redis.core.RedisHash;
import org.springframework.data.redis.core.TimeToLive;
@RedisHash
public class InternalAddres
我将一些代码作为两个单独的配置运行,如下所示:
SpringApplication north = new SpringApplication(MyApp.class);
north.setAdditionalProfiles("north");
north.run();
SpringApplication south = new SpringApplication(MyApp.class);
south.setAdditionalProfiles("south");
我正在使用SpringBoot开发一个web应用程序。
我所面临的问题如下。应用程序在Eclipse上运行良好,但是当我将项目部署为tomcat 7中的war时,它给了我"HTTP状态404“。在tomcat日志中没有发现异常。
以下是我的控制器:
@RestController
public class TinyUrlController{
@Autowired TinyUrlService tinyUrlService;
@RequestMapping("/create")
public String createUrl(@Reques