傅行帆 6 years ago
parent
commit
59bc90fa58

+ 1
- 1
SmartCommunity/SmartCommunityV1/zuul/pom.xml View File

@@ -32,7 +32,7 @@
32 32
 
33 33
 		<dependency>
34 34
 			<groupId>org.springframework.cloud</groupId>
35
-			<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
35
+			<artifactId>spring-cloud-starter-zuul</artifactId>
36 36
 			<version>1.4.5.RELEASE</version>
37 37
 		</dependency>
38 38
 

+ 4
- 2
SmartCommunity/SmartCommunityV1/zuul/src/main/java/com/example/demo/ZuulApplication.java View File

@@ -1,11 +1,13 @@
1 1
 package com.example.demo;
2 2
 
3 3
 import org.springframework.boot.SpringApplication;
4
-import org.springframework.boot.autoconfigure.SpringBootApplication;
4
+import org.springframework.cloud.client.SpringCloudApplication;
5 5
 import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
6
+import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
6 7
 
8
+@EnableZuulProxy
7 9
 @EnableDiscoveryClient
8
-@SpringBootApplication
10
+@SpringCloudApplication
9 11
 public class ZuulApplication {
10 12
 
11 13
 	public static void main(String[] args) {

+ 1
- 1
SmartCommunity/SmartCommunityV1/zuul/src/main/resources/bootstrap.yml View File

@@ -5,7 +5,7 @@ spring:
5 5
     name: zuul-server
6 6
   cloud:
7 7
     config:
8
-      name: application
8
+      name: zuul
9 9
       profile: dev
10 10
       label: master
11 11
 #      uri: http://localhost:7001/

+ 0
- 16
SmartCommunity/SmartCommunityV1/zuul/src/main/resources/mapper/ScUserMapper.xml View File

@@ -1,16 +0,0 @@
1
-<?xml version="1.0" encoding="UTF-8"?>
2
-<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
3
-<mapper namespace="com.example.demo.dao.ScUserMapper">
4
-
5
-    <parameterMap id="paramMap" type="com.example.demo.model.ScUser"></parameterMap>
6
-
7
-    <resultMap id="resultMap" type="com.example.demo.model.ScUser">
8
-        <id property="id" column="id"/>
9
-        <result property="userName" column="user_name"/>
10
-        <result property="userPassword" column="user_password"/>
11
-    </resultMap>
12
-
13
-    <select id="find" resultMap="resultMap">
14
-        select * from sc_user
15
-    </select>
16
-</mapper>