上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 30 下一页
摘要: 我们可以使用Springboot的登录拦截器进行登录验证,并完成登录跳转,错误的账户不进行跳转,正确的账户则跳转至success页面中。 同时添加登录拦截器,对于错误的账户不允许直接访问main.html页面。 实现步骤: 一.配置登录页面以及登录业务逻辑处理 1.首先建立一个springboot的 阅读全文
posted @ 2020-05-04 01:01 leagueandlegends 阅读(411) 评论(0) 推荐(0)
摘要: 晚上,当我准备将好的spring boot通过mvn clean package 打包成jar文件上传到linux服务器时,却在打包过程中出现了错误: C:\>mvn -version The JAVA_HOME environment variable is not defined correct 阅读全文
posted @ 2020-05-03 01:28 leagueandlegends 阅读(1614) 评论(0) 推荐(0)
摘要: 我们可以将Springboot结合thymeleaf进行国际化。 首先,我们新建项目,项目结构如下: 第一步,我们在pom.xml文件中引入thymeleaf jar包 pom.xml <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns: 阅读全文
posted @ 2020-04-21 20:08 leagueandlegends 阅读(465) 评论(0) 推荐(0)
摘要: 我们可以使用SpringBoot,将SpringBoot与mybatis结合起来,实现对数据库的增删改查的操作。 接下来举个例子: 第一步,首先创建一个数据库test,并创建表tb_user,向tb_user中插入几条数据。 create database test; -- -- Table str 阅读全文
posted @ 2020-04-20 08:44 leagueandlegends 阅读(623) 评论(0) 推荐(0)
摘要: 1.SpringMVC自动配置 SpringBoot 为我们定义好了SpringMVC的配置文件(org.springframework.boot.autoconfigure.web.WebMvcAutoConfiguration.class),首先我们来参考一下官网的SpringMVC的自动配置的 阅读全文
posted @ 2020-04-17 23:59 leagueandlegends 阅读(966) 评论(0) 推荐(0)
摘要: SpringBoot可以通过3种方式来获取静态资源 方式一:访问所有webjars/**,访问静态资源的路径为META-INF/resources/webjars,可以在此路径中查找静态资源。 举个例子: 新建一个项目工程 并在pom.xml文件中引入webjars包, pom.xml <?xml 阅读全文
posted @ 2020-04-14 15:11 leagueandlegends 阅读(1063) 评论(0) 推荐(0)
摘要: 给出两个 非空 的链表用来表示两个非负的整数。其中,它们各自的位数是按照 逆序 的方式存储的,并且它们的每个节点只能存储 一位 数字。 如果,我们将这两个数相加起来,则会返回一个新的链表来表示它们的和。 您可以假设除了数字 0 之外,这两个数都不会以 0 开头。 示例: 输入:(2 -> 4 -> 阅读全文
posted @ 2020-04-10 17:18 leagueandlegends 阅读(155) 评论(0) 推荐(0)
摘要: 今天来介绍一下bootstrapValidator的使用方法。 举个例子介绍一下: 首先建立一个java web工程,工程目录如下: 需要导入的文件有bootstrap.css、boostrapValidator.min.css、bootstrap.js、bootstrapValidator.min 阅读全文
posted @ 2020-04-10 11:18 leagueandlegends 阅读(258) 评论(0) 推荐(0)
摘要: 今天介绍一下SpringBoot配置日志文件 SpringBoot在所有的内部日志中使用Commons Logging,但是默认配置也提供了对常用日志的支持,如Java Util Logging,Log4J,Log4J2和Logback。但是每种Logger都可以通过配置使用控制台或者文件输出日志内 阅读全文
posted @ 2020-04-08 21:57 leagueandlegends 阅读(6027) 评论(0) 推荐(0)
摘要: springboot中添加debug属性值,可以查看工程的配置报告,默认的debug属性值为false debug=true server.port=8082 #配置项目访问路径 server.context-path=/boot1 启动Springboot项目,可以看到如下配置 阅读全文
posted @ 2020-04-08 08:29 leagueandlegends 阅读(272) 评论(0) 推荐(0)
上一页 1 ··· 14 15 16 17 18 19 20 21 22 ··· 30 下一页