Showing a Spring transaction in log

前端 未结 7 504
名媛妹妹
名媛妹妹 2020-11-30 19:10

I configured spring with transactional support. Is there any way to log transactions just to ensure I set up everything correctly? Showing in the log is a good way to see wh

7条回答
  •  忘掉有多难
    2020-11-30 19:51

    For Spring Boot application with application.properties

    logging.level.ROOT=INFO
    logging.level.org.springframework.orm.jpa=DEBUG
    logging.level.org.springframework.transaction=DEBUG
    

    or if you prefer Yaml (application.yaml)

    logging:
       level:
          org.springframework.orm.jpa: DEBUG
          org.springframework.transaction: DEBUG
    

提交回复
热议问题