Merge branch 'main' into feature/240101-tag

# Conflicts:
#	pom.xml
main
itao 1 year ago
commit 84ff02c0a0

@ -29,19 +29,48 @@
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-bus</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-binder-rabbit</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
<build>
<finalName>app</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- docker的maven插件官网 https://github.com/spotify/docker-maven-plugin -->
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<configuration>
<imageName>116.62.145.60:5000/${project.artifactId}:${project.version}</imageName>
<baseImage>jdk1.8</baseImage>
<entryPoint>["java", "-jar","/${project.build.finalName}.jar"]</entryPoint>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
<dockerHost>http://116.62.145.60:2375</dockerHost>
</configuration>
</plugin>
</plugins>
</build>

@ -1,19 +0,0 @@
server:
port: 9006
spring:
application:
name: luoo-comment
data:
mongodb:
uri: mongodb://8.134.98.47:27017/spitdb
username: root
password: 47084735Abc@
redis:
host: 8.134.98.47
port: 36379
eureka:
client:
service-url:
defaultZone: http://127.0.0.1:6868/eureka/
instance:
prefer-ip-address: true

@ -0,0 +1,8 @@
spring:
cloud:
config:
name: comment
profile: dev
label: master
uri: http://116.62.145.60:12000
# uri: http://127.0.0.1:12000

@ -0,0 +1,60 @@
<?xml version="1.0" encoding="UTF-8"?>
<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-4.0.0.xsd">
<parent>
<artifactId>luoo_parent</artifactId>
<groupId>com.luoo</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>luoo_config</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-config-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-bus</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-binder-rabbit</artifactId>
</dependency>
</dependencies>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<finalName>app</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!-- docker的maven插件官网 https://github.com/spotify/docker-maven-plugin -->
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<configuration>
<imageName>116.62.145.60:5000/${project.artifactId}:${project.version}</imageName>
<baseImage>jdk1.8</baseImage>
<entryPoint>["java", "-jar","/${project.build.finalName}.jar"]</entryPoint>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
<dockerHost>http://116.62.145.60:2375</dockerHost>
</configuration>
</plugin>
</plugins>
</build>
</project>

@ -0,0 +1,13 @@
package com.luoo.config;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.config.server.EnableConfigServer;
@SpringBootApplication
@EnableConfigServer
public class ConfigApplication {
public static void main(String[] args) {
SpringApplication.run(ConfigApplication.class);
}
}

@ -0,0 +1,19 @@
server:
port: 12000
spring:
application:
name: luoo-config
cloud:
config:
server:
git:
uri: https://gitee.com/sinkids/luoo_dev.git
username: sinkids
password: 47084735abc
rabbitmq:
host: 116.62.145.60
management:
endpoints:
web:
exposure:
include: bus-refresh

@ -22,20 +22,49 @@
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-bus</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-binder-rabbit</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
<build>
<finalName>app</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- docker的maven插件官网 https://github.com/spotify/docker-maven-plugin -->
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<configuration>
<imageName>116.62.145.60:5000/${project.artifactId}:${project.version}</imageName>
<baseImage>jdk1.8</baseImage>
<entryPoint>["java", "-jar","/${project.build.finalName}.jar"]</entryPoint>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
<dockerHost>http://116.62.145.60:2375</dockerHost>
</configuration>
</plugin>
</plugins>
</build>

@ -1,8 +0,0 @@
server:
port: 6868
eureka:
client:
register-with-eureka: false
fetch-registry: true
service-url:
defaultZone: http://127.0.0.1:${server.port}/eureka/

@ -0,0 +1,8 @@
spring:
cloud:
config:
name: eureka
profile: dev
label: master
uri: http://116.62.145.60:12000
# uri: http://127.0.0.1:12000

@ -40,5 +40,49 @@
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-bus</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-binder-rabbit</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
<build>
<finalName>app</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!-- docker的maven插件官网 https://github.com/spotify/docker-maven-plugin -->
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<configuration>
<imageName>116.62.145.60:5000/${project.artifactId}:${project.version}</imageName>
<baseImage>jdk1.8</baseImage>
<entryPoint>["java", "-jar","/${project.build.finalName}.jar"]</entryPoint>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
<dockerHost>http://116.62.145.60:2375</dockerHost>
</configuration>
</plugin>
</plugins>
</build>
</project>

@ -1,23 +0,0 @@
server:
port: 9010
spring:
application:
name: luoo-friend
datasource:
driverClassName: com.mysql.jdbc.Driver
url: jdbc:mysql://8.134.98.47:3307/indie_friend?characterEncoding=UTF8&useSSL=false
username: root
password: 47084735abc
jpa:
database: MySQL
show-sql: true
jwt:
config:
key: luoo
ttl: 3600000
eureka:
client:
service-url:
defaultZone: http://127.0.0.1:6868/eureka/
instance:
prefer-ip-address: true

@ -0,0 +1,8 @@
spring:
cloud:
config:
name: friend
profile: dev
label: master
uri: http://116.62.145.60:12000
# uri: http://127.0.0.1:12000

@ -26,10 +26,54 @@
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-bus</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-binder-rabbit</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>com.luoo</groupId>
<artifactId>luoo_common</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<finalName>app</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!-- docker的maven插件官网 https://github.com/spotify/docker-maven-plugin -->
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<configuration>
<imageName>116.62.145.60:5000/${project.artifactId}:${project.version}</imageName>
<baseImage>jdk1.8</baseImage>
<entryPoint>["java", "-jar","/${project.build.finalName}.jar"]</entryPoint>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
<dockerHost>http://116.62.145.60:2375</dockerHost>
</configuration>
</plugin>
</plugins>
</build>
</project>

@ -1,25 +0,0 @@
server:
port: 9011
spring:
application:
name: luoo-manage
eureka:
client:
service-url:
defaultZone: http://127.0.0.1:6868/eureka/
instance:
prefer-ip-address: true
jwt:
config:
key: luoo
zuul:
routes:
luoo-user:
path: /user/**
serviceId: luoo-user
luoo-gathering:
path: /gathering/**
serviceId: luoo-gathering
luoo-music:
path: /article/**
serviceId: luoo-music

@ -0,0 +1,8 @@
spring:
cloud:
config:
name: manage
profile: dev
label: master
uri: http://116.62.145.60:12000
# uri: http://127.0.0.1:12000

@ -32,19 +32,48 @@
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-bus</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-binder-rabbit</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
<build>
<finalName>app</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- docker的maven插件官网 https://github.com/spotify/docker-maven-plugin -->
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<configuration>
<imageName>116.62.145.60:5000/${project.artifactId}:${project.version}</imageName>
<baseImage>jdk1.8</baseImage>
<entryPoint>["java", "-jar","/${project.build.finalName}.jar"]</entryPoint>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
<dockerHost>http://116.62.145.60:2375</dockerHost>
</configuration>
</plugin>
</plugins>
</build>

@ -1,22 +0,0 @@
server:
port: 9004
spring:
application:
name: luoo-music #指定服务名
datasource:
driverClassName: com.mysql.jdbc.Driver
url: jdbc:mysql://8.134.98.47:3307/indie_music?characterEncoding=UTF8&useSSL=false
username: root
password: 47084735abc
jpa:
database: MySQL
show-sql: true
redis:
host: 8.134.98.47
port: 36379
eureka:
client:
service-url:
defaultZone: http://127.0.0.1:6868/eureka/
instance:
prefer-ip-address: true

@ -0,0 +1,8 @@
spring:
cloud:
config:
name: music
profile: dev
label: master
uri: http://116.62.145.60:12000
# uri: http://127.0.0.1:12000

@ -15,6 +15,22 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-bus</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-binder-rabbit</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>com.aliyun</groupId>
<artifactId>aliyun-java-sdk-dysmsapi</artifactId>
@ -33,4 +49,33 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<finalName>app</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!-- docker的maven插件官网 https://github.com/spotify/docker-maven-plugin -->
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<configuration>
<imageName>116.62.145.60:5000/${project.artifactId}:${project.version}</imageName>
<baseImage>jdk1.8</baseImage>
<entryPoint>["java", "-jar","/${project.build.finalName}.jar"]</entryPoint>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
<dockerHost>http://116.62.145.60:2375</dockerHost>
</configuration>
</plugin>
</plugins>
</build>
</project>

@ -1,13 +0,0 @@
server:
port: 9009
spring:
application:
name: luoo-sms
rabbitmq:
host: 116.62.145.60
aliyun:
sms:
accessKeyId: xxx
accessKeySecret: xxx
template_code: xxx
sign_name: xxx

@ -0,0 +1,8 @@
spring:
cloud:
config:
name: sms
profile: dev
label: master
uri: http://116.62.145.60:12000
# uri: http://127.0.0.1:12000

@ -40,19 +40,48 @@
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-bus</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-binder-rabbit</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
<build>
<finalName>app</finalName>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- docker的maven插件官网 https://github.com/spotify/docker-maven-plugin -->
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>0.4.13</version>
<configuration>
<imageName>116.62.145.60:5000/${project.artifactId}:${project.version}</imageName>
<baseImage>jdk1.8</baseImage>
<entryPoint>["java", "-jar","/${project.build.finalName}.jar"]</entryPoint>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
<dockerHost>http://116.62.145.60:2375</dockerHost>
</configuration>
</plugin>
</plugins>
</build>

@ -72,6 +72,28 @@ public class UserController {
return new Result(true,StatusCode.OK,"登录成功",map);
}
@RequestMapping(value = "/appLogin/{mobile}/{checkcode}",method = RequestMethod.POST)
public Result appLogin(@PathVariable String mobile,@PathVariable String checkcode){
// 得到缓存中的验证码
String checkcodeRedis = (String)redisTemplate.opsForValue().get("checkcode_"+mobile);
if (checkcodeRedis.isEmpty()){
return new Result(false,StatusCode.ERROR,"请先获取手机验证码");
}
if (!checkcodeRedis.equals(checkcode)) {
return new Result(false,StatusCode.ERROR,"请输入正确的验证码");
}
User user = userService.findByMobile(mobile);
// 如果数据库中有这个手机号,登录通道,
if (user != null){
String token = jwtUtil.createJWT(user.getId(),user.getMobile(),"user");
}
// 如果数据库中没有这个手机号,为新用户,注册添加用户
return new Result(true,StatusCode.OK,"登录成功");}
/**
*
*/

@ -236,4 +236,8 @@ public class UserService {
userDao.updatefollowcount(x,userid);
}
public User findByMobile(String mobile) {
User user = userDao.findByMobile(mobile);
return user;
}
}

@ -1,28 +0,0 @@
server:
port: 9008
spring:
application:
name: luoo-user #指定服务名
datasource:
driverClassName: com.mysql.jdbc.Driver
url: jdbc:mysql://8.134.98.47:3307/indie_user?characterEncoding=UTF8&useSSL=false
username: root
password: 47084735abc
jpa:
database: MySQL
show-sql: true
redis:
host: 116.62.145.60
rabbitmq:
host: 116.62.145.60
jwt:
config:
key: luoo
ttl: 3600000
eureka:
client:
service-url:
defaultZone: http://127.0.0.1:6868/eureka/
instance:
prefer-ip-address: true

@ -0,0 +1,8 @@
spring:
cloud:
config:
name: user
profile: dev
label: master
uri: http://116.62.145.60:12000
# uri: http://127.0.0.1:12000

@ -25,6 +25,22 @@
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-zuul</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-bus</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-binder-rabbit</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
</dependencies>
<build>

@ -1,22 +0,0 @@
server:
port: 9012
spring:
application:
name: luoo-web
eureka:
client:
service-url:
defaultZone: http://127.0.0.1:6868/eureka/
instance:
prefer-ip-address: true
zuul:
routes:
luoo-user:
path: /user/**
serviceId: luoo-user
luoo-music:
path: /article/**
serviceId: luoo-music
luoo-comment:
path: /comment/**
serviceId: luoo-comment

@ -0,0 +1,8 @@
spring:
cloud:
config:
name: web
profile: dev
label: master
uri: http://116.62.145.60:12000
# uri: http://127.0.0.1:12000

@ -18,6 +18,7 @@
<module>luoo_manage</module>
<module>luoo_web</module>
<module>luoo_sms</module>
<module>luoo_config</module>
<module>luoo_tag</module>
</modules>
<packaging>pom</packaging>
@ -59,6 +60,10 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-config</artifactId>
</dependency>
</dependencies>
@ -101,4 +106,6 @@
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>

Loading…
Cancel
Save