JAVA
清风何来
这个作者很懒,什么都没留下…
展开
-
监听器
在web.xml中配置<listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener>项目启动的时候,将一些常用数据放在application域中,都能用public class My...原创 2019-05-24 16:04:24 · 150 阅读 · 0 评论 -
this.getClass().getResource("/").getPath()与this.getClass().getResource("").getPath()的区别
1.结构2.代码package util;public class Test01 { public void test() { // TODO Auto-generated method stub System.out.println("测试========》"); String s1=this.getClass().get...原创 2019-11-23 18:15:20 · 514 阅读 · 0 评论 -
Maven的settings.xml的详细配置
<?xml version="1.0" encoding="UTF-8"?><!--Licensed to the Apache Software Foundation (ASF) under oneor more contributor license agreements. See the NOTICE filedistributed with this work...原创 2019-11-23 10:47:15 · 271 阅读 · 0 评论 -
Maven使用tomcat8-maven-plugin插件
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven...原创 2019-10-26 10:05:59 · 378 阅读 · 0 评论 -
前端选中ID批量删除后端数据完整步骤
数据库的表和数据创建product表CREATE TABLE `product` ( `id` int(11) NOT NULL, `productNum` varchar(50) DEFAULT NULL, `productName` varchar(50) DEFAULT NULL, `cityName` varchar(50) DEFAULT NULL, `Dep...原创 2019-10-25 16:41:09 · 4106 阅读 · 1 评论 -
Spring-JDBC数据库连接
1.在maven项目结构 2.属性文件:datasource.properties(DataSource连接参数)jdbc.url=jdbc:mysql://localhost:3306/test?useUnicode=true&characterEncoding=utf8jdbc.driverClassName=com.mysql.jdbc.Driverjdbc.username...原创 2019-06-16 20:44:22 · 171 阅读 · 0 评论 -
字符串以逗号分隔的转换为List方法
1: 利用JDK的Arrays类Stringstr ="a,b,c"; List<String> split= Arrays.asList(str.split(","));2: 利用Guava的SplitterStringstr ="a, b, c";List<String> splitToList= Splitter.on(",").trimResults()...原创 2019-06-25 16:39:38 · 17681 阅读 · 1 评论