自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(8)
  • 收藏
  • 关注

原创 spring boot 配置跨域

1.yml中配置参数 cors: origins: [http://localhost:8087] credentials: true methods: [GET,POST,PUT,DELET,OPTIONS] heads: [] exposeHeaders: [user_token] 2.properties对象 @Configuration @ConfigurationProperties(prefix = "cors") public class CorsProperties {

2022-04-21 23:27:56 480 2

原创 Apache——DBUtils

public class BasicDao<T> { private static QueryRunner queryRunner; static { queryRunner = new QueryRunner(); } //返回结果集(ArrayList集合) public List<T> queryResultSet(String sql, Class<T> clazz, Object... paramet

2021-12-24 19:11:20 649

原创 JDBC连接池——druid

public class JDBCUtilsByDruid { private JDBCUtilsByDruid(){} private static DataSource dataSource; static { Properties properties = new Properties(); try { properties.load(new FileInputStream("src\\druid.propertie

2021-12-24 19:09:58 126

原创 sql批处理

配置文件中url后加?rewriteBatchedStatements=true @Test public void test01() { Connection connection = JDBCUtils.getConnection(); String sql = "insert into actor values(null ,? ,?)"; PreparedStatement preparedStatement = null; tr

2021-12-23 21:48:22 967

原创 druid连接池

https://repo1.maven.org/maven2/com/alibaba/druid/1.1.10/ @Test public void test01() throws Exception { Properties properties = new Properties(); properties.load(new FileInputStream("src\\druid.properties")); DataSource dataSourc

2021-12-22 19:34:22 574

原创 JDBCUtils

/** * jdbc工具类 */ public class JDBCUtils { private static String user; private static String password; private static String url; private static String driver; static { Properties properties = new Properties(); try { .

2021-12-22 19:13:57 65

原创 idea连接数据库02-preparedStatement解决SQL注入

public void test01() throws Exception {//DQL Properties properties = new Properties(); properties.load(new FileInputStream("src\\mysql.properties")); String url = properties.getProperty("url"); //加载driver Class....

2021-12-21 20:44:17 737

原创 idea连接数据库01

在这里插package com.myjabc.practice_01; import com.mysql.cj.jdbc.Driver; import org.junit.Test; import java.io.FileInputStream; import java.io.IOException; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import java.sql

2021-12-21 10:47:16 316

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除