方法一: logging: level: debug level.io.renren: debug path: logs/ file: admin.log   方法二 logging:    level:     com:       huiyu:         digitalcampus:    service:   mapper: debug…
解决方案: springboot的yml中的bruid没有提示只要在maven加上:druid-spring-boot-starter(注意版本的统一,否则可能会冲突) 效果图:…
实现Square类,让其继承自Rectangle类,并在Square类增添新属性和方法,在2的基础上,在Square类中重写Rectangle类中的初始化和打印方法 #import <Foundation/Foundation.h> @interface Rectangle : NSObject{ int width; int height; } @property int width,height; -(int) area; -(int) perimeter; -(void)setWidth…
前言 在项目中经常遇到需要读取配置文件中的配置信息,这些配置信息之所以不写在代码中是因为实际项目发布或者部署之后会进行更改,而如果写在代码中编译之后没有办法进行修改. 之前使用的是properties进行的配置和读取的. 而在SpringBoot中我们采用yml的配置时也需要读取配置文件中的信息. 同时因为这样会导致配置文件增多,所以我们需要分离配置文件. github:https://github.com/LinkinStars/springBootTemplate 分离配置文件 在appli…
记录一下java开发中多数据源的配置过程, 参考博客:https://blog.csdn.net/weinichendian/article/details/72903757,我在这里进行了整理,使用yml:排除了里边在springboot2.0报错的内容,以及里边没有说太清楚的内容,进行了详细的说明 1.配置文件application.yml personnel:#数据源1 driver-class-name: com.mysql.cj.jdbc.Driver jdbc-url: jdbc:m…
使用Hibernate的框架开发时,可在Hibernate.cfg.xml中加上 <property name="hibernate.show_sql">true</property><!-- 配置显示sql语句 -->  <property name="format_sql">true</property><!-- 让输出的sql语句格式化 --> 就可以在控制台显示对应的sql语句了,对于开…
启动springboot项目时报错:/application.yml.....这大致就是说application.yml有问题,那么目前我所知道的大致两种情况会报错,第一种是yml格式有问题,要注意缩进和空格,第二种就是其中存在中文注释.第二种bug的解决方法如下: 1.先删掉现有的yml中的所有中文注释 2.在ideal中设置文件编码为utf-8 3.将注释重新写到yml中即可…
#!/usr/local/bin/python3 # -*- coding:utf-8 -*- #key-value #dict 无序,无下标,不需要下标,因为有key stu={ 'stu001':"zhang yu", 'stu002':"ma hong yan", 'stu003':"zhang guo bin", 'stu004':"sha chun hua" } ''' -----------------------…
#文件大小 MB必须大写 # maxFileSize 是单个文件大小 # maxRequestSize是设置总上传的数据大小 spring: servlet: multipart: enabled: true max-file-size: 20MB max-request-size: 20MB 提示:必须配置,如果采用默认的配置,稍大的文件就不能上传了.…
问题描述:使用SpringBoot整合redis进行yml配置的时候,启动工程报错,提示加载application.yml配置文件失败: ::27.430 [main] ERROR org.springframework.boot.SpringApplication - Application startup failed java.lang.IllegalStateException: Failed to load property source from location 'classpat…