Commit b048e4b9 authored by maliang's avatar maliang

权限控制

parent 3dbf29f1
......@@ -77,11 +77,6 @@
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>${mybatis.version}</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<!--<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
......@@ -143,6 +138,13 @@
<artifactId>jedis</artifactId>
<version>2.10.2</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.44</version>
<scope>compile</scope>
<!--<scope>runtime</scope>-->
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
......
......@@ -16,15 +16,15 @@ public class ConnectionJDBC {
* */
public static Connection getConnection() throws Exception {
//1.加载配置文件
InputStream is = ClassLoader.getSystemResourceAsStream("config.properties");
Properties pros = new Properties();
pros.load(is);
// InputStream is = ClassLoader.getSystemResourceAsStream("config.properties");
// Properties pros = new Properties();
// pros.load(is);
//2.读取配置信息
String user = pros.getProperty("user");
String password = pros.getProperty("password");
String url = pros.getProperty("url");
String driverClass = pros.getProperty("driverClass");
String user = "read_bi";
String password = "OxmQkfpS2019";
String url = "jdbc:mysql://rr-2ze3749220qh1448p.mysql.rds.aliyuncs.com:3306/lwby_novel?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false";
String driverClass = "com.mysql.jdbc.Driver";
//System.out.println(driverClass);
......@@ -100,6 +100,10 @@ public class ConnectionJDBC {
String codeId = rs.getString( 3);
String advertName = rs.getString( 4);
Integer platformId = rs.getInt( 5);
System.out.println(advertiserId);
System.out.println(advertiserName);
// 获取列的别名:列的别名,使用类的属性名充当
//String columnLabel = rsmd.getColumnLabel(i + 1);
//给相应属性赋值
......
......@@ -12,7 +12,7 @@ cassnadra.keyspace=dmp
user=read_bi
password=OxmQkfpS2019
url=jdbc:mysql://rr-2ze3749220qh1448p.mysql.rds.aliyuncs.com:3306/lwby_novel
url=jdbc:mysql://rr-2ze3749220qh1448p.mysql.rds.aliyuncs.com:3306/lwby_novel?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false
driverClass=com.mysql.jdbc.Driver
## redis配置
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment