随笔分类 -  spring boot

spring boot server port不起作用
摘要:自己在application.yml中 server: port:8088刚开始这样设置不起作用,后来发现是port:和端口号之间需要一个空格才能生效,如下port: 8099yml语法规则的问题 阅读全文

posted @ 2020-12-08 17:49 3SU 阅读(1715) 评论(0) 推荐(0)

java自定义类中jdbctemplate为null
摘要:个人笔记,更详细可看csdn文章:https://blog.csdn.net/qq_41876436/article/details/80944020 自定义类 @Service public class MyDBHandle { Resource private JdbcTemplate jdbcTemplate; } 在其他类调用(不传入外部JdbcTemplate,通过自动注入实现) MyD 阅读全文

posted @ 2019-10-21 17:03 3SU 阅读(1913) 评论(0) 推荐(0)

spring web 不定参数
摘要:不将参数定义为函数变量,而是使用HttpServletRequest 接收参数, @RequestMapping("/testrequest")public String testrequest(HttpServletRequest httprq){ String a = httprq.getPar 阅读全文

posted @ 2019-08-13 15:52 3SU 阅读(312) 评论(0) 推荐(0)

spring boot添加自定义配置文件
摘要:spring boot 2.+版本 resources右键新建属性文件(new Resources Bundle),在新建属性文件中添加自定义属性 新建一个操作类对该属性文件进关联,操作类须进行定义 其他地方调用: 阅读全文

posted @ 2019-08-13 15:14 3SU 阅读(456) 评论(0) 推荐(0)

IntelliJ IDEA查看方法的返回类型
摘要:快捷键ctrl+q(quick document lookup) 阅读全文

posted @ 2019-08-12 15:58 3SU 阅读(2153) 评论(0) 推荐(0)

连接MySql报错->The server time zone value 'XXXXX' is unrecognized...............
摘要:新版的驱动类如果为com.mysql.cj.jdbc.Driver,需要设置服务器时区,设置数据库连接url时加上下端红色参数就行url: jdbc:mysql://127.0.0.1:3306/db?characterEncoding=utf-8&useSSL=false&serverTimezo 阅读全文

posted @ 2019-08-12 15:23 3SU 阅读(341) 评论(0) 推荐(0)

spring boot新建工程中使用mysql,com.mysql.jdbc.Driver标红
摘要:将pom.xml中的 阅读全文

posted @ 2019-08-10 18:16 3SU 阅读(1671) 评论(1) 推荐(0)