
Springboot
文章平均质量分 78
爱为斯坦
这个作者很懒,什么都没留下…
展开
-
对MVC的理解以及如何实现一个简单的MVC
null;/*** 对参数进行解析,并设置参数类型、参数名、参数默认值*/0 : 1);if (pv!= null) {= null) {= null) {} else {throw new ServerErrorException("请给参数标记注解,不支持的参数类型 " + classType + " at method " + method);原创 2024-07-02 20:44:50 · 441 阅读 · 0 评论 -
【根据消息类型实现订阅发布模型】
基于消息类型的订阅发布者模型原创 2024-04-22 20:32:53 · 376 阅读 · 2 评论 -
Springboot国际化(中文与英语的切换)
国际化1)、编写国际化配置文件;2)、使用ResourceBundleMessageSource管理国际化资源文件3)、在页面使用fmt:message取出国际化内容步骤:1)、编写国际化配置文件,抽取页面需要显示的国际化消息三个配置文件分别对应默认状态,英文状态和中文状态下的显示在application配置文件中加上spring.messages.basename=i18n/login接着进入login.pro配置文件进行配置一个个配置好属性2)、file->setti原创 2020-06-15 15:01:15 · 1133 阅读 · 0 评论 -
thymeleaf模板引擎引入及使用
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> 2.1.6 </dependency> 切换thymeleaf版本 如果你是使用的springboot2.0及以上版本,那系统默认的thymeleaf就是3.以上的,一下就原创 2020-06-15 14:44:00 · 1420 阅读 · 0 评论