fix: integrated example rocketmq streams upgrade to springboot 3.0 (#2992)
* fix: integrated rocketmq streams upgrade to springboot 3.0 * refactor: remove unnecessary spring-boot-bootstrap dependency * fix: Update jdk version in Dockerfilepull/2996/head
parent
90e9ba8463
commit
8998b36a02
@ -1,5 +1,5 @@
|
||||
FROM openjdk:8
|
||||
ADD /target/integrated-account-2.2.9-SNAPSHOT.jar /app.jar
|
||||
FROM openjdk:17
|
||||
ADD /target/integrated-account-*.jar /app.jar
|
||||
RUN bash -c 'touch /app.jar'
|
||||
EXPOSE 8012
|
||||
ENTRYPOINT ["java", "-jar","/app.jar"]
|
@ -1,5 +1,5 @@
|
||||
FROM openjdk:8
|
||||
ADD /target/integrated-frontend-2.2.9-SNAPSHOT.jar /app.jar
|
||||
FROM openjdk:17
|
||||
ADD /target/integrated-frontend-*.jar /app.jar
|
||||
RUN bash -c 'touch /app.jar'
|
||||
EXPOSE 8080
|
||||
ENTRYPOINT ["java", "-jar","/app.jar"]
|
@ -1,5 +1,5 @@
|
||||
FROM openjdk:8
|
||||
ADD /target/integrated-gateway-2.2.9-SNAPSHOT.jar /app.jar
|
||||
FROM openjdk:17
|
||||
ADD /target/integrated-gateway-*.jar /app.jar
|
||||
RUN bash -c 'touch /app.jar'
|
||||
EXPOSE 30010
|
||||
ENTRYPOINT ["java", "-jar","/app.jar"]
|
@ -1,5 +1,5 @@
|
||||
FROM openjdk:8
|
||||
ADD /target/integrated-order-2.2.9-SNAPSHOT.jar /app.jar
|
||||
FROM openjdk:17
|
||||
ADD /target/integrated-order-*.jar /app.jar
|
||||
RUN bash -c 'touch /app.jar'
|
||||
EXPOSE 8013
|
||||
ENTRYPOINT ["java", "-jar","/app.jar"]
|
@ -1,5 +1,5 @@
|
||||
FROM openjdk:8
|
||||
ADD /target/integrated-praise-consumer-2.2.9-SNAPSHOT.jar /app.jar
|
||||
FROM openjdk:17
|
||||
ADD /target/integrated-praise-consumer-*.jar /app.jar
|
||||
RUN bash -c 'touch /app.jar'
|
||||
EXPOSE 8014
|
||||
ENTRYPOINT ["java", "-jar","/app.jar"]
|
@ -0,0 +1,20 @@
|
||||
package com.alibaba.cloud.integration.consumer.listener;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
import com.alibaba.cloud.integration.consumer.message.PraiseMessage;
|
||||
import com.alibaba.cloud.integration.consumer.service.PraiseService;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.messaging.Message;
|
||||
|
||||
@Configuration
|
||||
public class ListenerAutoConfiguration {
|
||||
@Bean
|
||||
public Consumer<Message<PraiseMessage>> consumer(PraiseService praiseService) {
|
||||
return msg -> {
|
||||
praiseService.praiseItem(msg.getPayload().getItemId());
|
||||
};
|
||||
}
|
||||
}
|
@ -1,42 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.alibaba.cloud.integration.consumer.listener;
|
||||
|
||||
import com.alibaba.cloud.integration.consumer.message.PraiseMessage;
|
||||
import com.alibaba.cloud.integration.consumer.message.PraiseSink;
|
||||
import com.alibaba.cloud.integration.consumer.service.PraiseService;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cloud.stream.annotation.StreamListener;
|
||||
import org.springframework.messaging.handler.annotation.Payload;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author TrevorLink
|
||||
*/
|
||||
@Component
|
||||
public class PraiseConsumer {
|
||||
|
||||
@Autowired
|
||||
private PraiseService praiseService;
|
||||
|
||||
@StreamListener(PraiseSink.PRAISE_INPUT)
|
||||
public void onMessage(@Payload PraiseMessage message) {
|
||||
praiseService.praiseItem(message.getItemId());
|
||||
}
|
||||
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.alibaba.cloud.integration.consumer.message;
|
||||
|
||||
import org.springframework.cloud.stream.annotation.Input;
|
||||
import org.springframework.messaging.SubscribableChannel;
|
||||
|
||||
/**
|
||||
* @author TrevorLink
|
||||
*/
|
||||
public interface PraiseSink {
|
||||
|
||||
/**
|
||||
* rocketmq input name.
|
||||
*/
|
||||
String PRAISE_INPUT = "praise-input";
|
||||
|
||||
@Input(PRAISE_INPUT)
|
||||
SubscribableChannel praiseInput();
|
||||
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
FROM openjdk:8
|
||||
ADD /target/integrated-praise-provider-2.2.9-SNAPSHOT.jar /app.jar
|
||||
FROM openjdk:17
|
||||
ADD /target/integrated-praise-provider-*.jar /app.jar
|
||||
RUN bash -c 'touch /app.jar'
|
||||
EXPOSE 8015
|
||||
ENTRYPOINT ["java", "-jar","/app.jar"]
|
@ -1,30 +0,0 @@
|
||||
/*
|
||||
* Copyright 2013-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* https://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.alibaba.cloud.integration.provider.message;
|
||||
|
||||
import org.springframework.cloud.stream.annotation.Output;
|
||||
import org.springframework.messaging.MessageChannel;
|
||||
|
||||
/**
|
||||
* @author TrevorLink
|
||||
*/
|
||||
public interface PraiseSource {
|
||||
|
||||
@Output("praise-output")
|
||||
MessageChannel praiseOutput();
|
||||
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
FROM openjdk:8
|
||||
ADD /target/integrated-storage-2.2.9-SNAPSHOT.jar /app.jar
|
||||
FROM openjdk:17
|
||||
ADD /target/integrated-storage-*.jar /app.jar
|
||||
RUN bash -c 'touch /app.jar'
|
||||
EXPOSE 8011
|
||||
ENTRYPOINT ["java", "-jar","/app.jar"]
|
Loading…
Reference in New Issue