随笔分类 -  j2ee

1 2 下一页
spring MVC请求路径设置
摘要:1.spring MVC支持的ant风格的路径 ?:表示任意的单个字符 如:@RequestMapping("/test?/hello") *:表示任意的0个或多个字符 如:@RequestMapping("/test*/hello") **:表示任意的一层或多层目录 如:@RequestMappi 阅读全文
posted @ 2021-10-09 00:45 pcant 阅读(630) 评论(0) 推荐(0)
spring boot MVC配置
摘要:https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#features.developing-web-applications.spring-mvc Spring Boot provides auto-config 阅读全文
posted @ 2021-10-08 18:00 pcant 阅读(346) 评论(0) 推荐(0)
spring以及spring boot参数配置
摘要:1.@PropertySource注解 Annotation providing a convenient and declarative mechanism for adding a org.springframework.core.env.PropertySource to Spring's o 阅读全文
posted @ 2021-10-03 15:44 pcant 阅读(142) 评论(0) 推荐(0)
mybatis使用-整合到spring构架
摘要:二、将mybatis整合到spring框架中 参照mybatis官方文档:http://mybatis.org/spring/zh/getting-started.html 官方文档介绍中,对Mapper的注入使用的是xml配置文件,本文使用的java代码配置实现。 代码结构: 1.使用eclips 阅读全文
posted @ 2021-10-02 10:07 pcant 阅读(139) 评论(0) 推荐(0)
mybatis的使用-单独使用mybatis
摘要:一、单独使用mybatis 参照mybatis官方文档 https://mybatis.org/mybatis-3/zh/getting-started.html 整体代码结构: 1.使用eclipse新建一个maven项目,将项目的java编译器版本修改为1.8。 或者通过修改pom.xml文件, 阅读全文
posted @ 2021-10-02 00:04 pcant 阅读(628) 评论(0) 推荐(0)
函数式接口FunctionalInterface
摘要:JDK8新增的函数式编程 FunctionalInterface跟Interface相似,但是只能有一个抽象方法,可以有多个默认的实现,不能有其他已实现的方法。 1.使用@FunctionalInterface注解 2.必须要有一个抽象方法,且只能有一个抽象方法,不能有非抽象方法 3.可以有多个特定 阅读全文
posted @ 2021-06-09 09:49 pcant 阅读(193) 评论(0) 推荐(0)
spring官方文档
摘要:https://docs.spring.io/spring-framework/docs/5.3.x/reference/ 阅读全文
posted @ 2021-06-04 09:07 pcant 阅读(233) 评论(0) 推荐(0)
Spring AOP——Spring 中面向切面编程(转)
摘要:https://www.cnblogs.com/joy99/p/10941543.html 一、AOP——另一种编程思想 1.1 什么是 AOP AOP (Aspect Orient Programming),直译过来就是 面向切面编程。AOP 是一种编程思想,是面向对象编程(OOP)的一种补充。面 阅读全文
posted @ 2021-06-03 17:29 pcant 阅读(117) 评论(0) 推荐(0)
Spring项目的类中获取ApplicationContext实例的方式
摘要:获取ApplicationContext实例的方式: 1.实现ApplicationContextAware接口 新增自定义类,并实现ApplicationContextAware接口,Spring加载该类时会自动调用setApplicationContext方法。 import org.sprin 阅读全文
posted @ 2021-06-03 11:48 pcant 阅读(254) 评论(0) 推荐(0)
java类加载机制(转)
摘要:作者:阿里巴巴淘系技术链接:https://www.zhihu.com/question/46719811/answer/1739289578来源:知乎著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。 通过灵活定义classloader的加载机制,我们可以完成很多事情,例如解决类 阅读全文
posted @ 2021-06-03 10:35 pcant 阅读(101) 评论(0) 推荐(0)
spring配置文件(application.properties、application.yml、application.yaml))中的配置项加载到自定义类中的方法
摘要:spring配置文件(application.properties、application.yml、application.yaml))中的配置项加载到自定义类中的方法 application.properties文件内容: util.app.name = test util.app.version 阅读全文
posted @ 2021-06-03 00:29 pcant 阅读(306) 评论(0) 推荐(0)
解决pom文件报错 Unknown pom.xml /test line 1 Maven Configuration Problem
摘要:在 pom 文件的第一行显示一个红叉,在 Eclipse 的 Problems 页签中,看到这个错误的详情是: Maven Configuration Problem 在pom.xml文件中的<properties>节点中加入<maven-jar-plugin.version>3.0.0</mave 阅读全文
posted @ 2021-04-09 16:01 pcant 阅读(757) 评论(0) 推荐(0)
百度开源的低代码前端框架-amis
摘要:构架介绍:https://baidu.gitee.io/amis/zh-CN/docs/index amis 是一个低代码前端框架,它使用 JSON 配置来生成页面,可以减少页面开发工作量,极大提升效率。 在经历了十几年的发展后,前端开发变得越来越复杂,门槛也越来越高,要使用当下流行的 UI 组件库 阅读全文
posted @ 2021-02-24 11:41 pcant 阅读(6116) 评论(0) 推荐(1)
解决github访问不了的问题
摘要:github网站,以及其他的国外网站有时会遇到访问不了的情况,本文介绍怎么处理这样的问题。 一、站长工具查询DNS 访问 http://tool.chinaz.com/dns/ ,在输入框中填写 github.com,然后点击检测按钮,会列出响应ip 也可以通过 https://www.ipaddr 阅读全文
posted @ 2021-01-06 00:05 pcant 阅读(522) 评论(0) 推荐(0)
spring打包jar包时jsp页面无法访问
摘要:当前pom.xml配置 <build> <resources> <!--引入配置文件--> <resource> <directory>src/main/resources</directory> <filtering>false</filtering> </resource> <!--引入静态文件 阅读全文
posted @ 2020-05-12 16:28 pcant 阅读(490) 评论(0) 推荐(0)
Apache Shiro 使用手册(转)
摘要:Apache Shiro 使用手册 (一)Shiro架构介绍 一、什么是ShiroApache Shiro是一个强大易用的Java安全框架,提供了认证、授权、加密和会话管理等功能: 认证 - 用户身份识别,常被称为用户“登录”; 授权 - 访问控制; 密码加密 - 保护或隐藏数据防止被偷窥; 会话管 阅读全文
posted @ 2020-05-07 00:37 pcant 阅读(264) 评论(0) 推荐(0)
java中常用注解
摘要:Spring部分 1、声明bean的注解 @Component 组件,没有明确的角色 @Service 在业务逻辑层使用(service层) @Repository 在数据访问层使用(dao层) @Controller 在展现层使用,控制器的声明(C) @RestController 在展现层使用, 阅读全文
posted @ 2020-04-29 23:57 pcant 阅读(433) 评论(0) 推荐(0)
spring boot actuator 生产就绪功能
摘要:Spring Boot包含许多附加功能,可帮助您在将应用程序投入生产时对其进行监视和管理。可以选择使用HTTP端点或JMX管理和监视您的应用程序。审核,运行状况和指标收集可以自动应用于您的应用程序。 只有基于Spring MVC的应用程序才可以通过HTTP终端来监控应用程序的运行指标。 使用Spri 阅读全文
posted @ 2020-04-26 07:16 pcant 阅读(334) 评论(0) 推荐(0)
java日志管理
摘要:1.相关概念 日志统一框架(日志门面):apache commons logging、slf4j 日志实现框架(实现层):JDK自带的logging(java.util.logging)、log4j、Java Util Logging、log4j2、logback. (1)JDK自带的logging 阅读全文
posted @ 2020-04-25 02:06 pcant 阅读(496) 评论(0) 推荐(0)
spring boot项目打成war包部署到tomcat
摘要:实例项目共三个模块: m1 m2 package 其中package依赖m1和m2,将m1和m2编译生成的jar包一起打成一个war包。 springboot项目打成war包部署到tomcat时需要改变启动方式,否则运行tomcat时war包只会解压,但是加载不了 package的Applicati 阅读全文
posted @ 2020-04-20 00:29 pcant 阅读(910) 评论(0) 推荐(0)

1 2 下一页