Commit b048e4b9 authored by maliang's avatar maliang

权限控制

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