spring-boot

Gradle fails to build at Test

£可爱£侵袭症+ 提交于 2021-02-11 17:14:13
问题 I have a spring boot project that has multiple modules each with its own gradle file. Spring boot version: 1.5.2.RELEASE gradle version:3.4 server (which includes main class) and other configurations shared (Utility classes used by other modules) service (module with various repository and services) transaction (module which handles transaction) I need to write test for the project but I cannot change the project structure. I created a test in my transaction module. The parent gradle file is

Gradle fails to build at Test

五迷三道 提交于 2021-02-11 17:14:12
问题 I have a spring boot project that has multiple modules each with its own gradle file. Spring boot version: 1.5.2.RELEASE gradle version:3.4 server (which includes main class) and other configurations shared (Utility classes used by other modules) service (module with various repository and services) transaction (module which handles transaction) I need to write test for the project but I cannot change the project structure. I created a test in my transaction module. The parent gradle file is

AWS Aurora Serverless Spring Boot Communication Link Error

﹥>﹥吖頭↗ 提交于 2021-02-11 17:01:51
问题 I am doing a prototype for moving our Spring Boot based application to AWS Aurora DB including Serverless mode. With Provisioned mode things work as expected. However with serverless mode the application is not able to connect to the DB from EC2 instance with exception as: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]:

Calculate delta Offsets Kafka Java

。_饼干妹妹 提交于 2021-02-11 16:39:09
问题 In a spring project i used Kafka and now I want to make a method which takes "TopicName" and "GroupeId" as parameters and calculate the difference between "Lastoffsets of the topic partitions" and the "offsets consumed by the group" for the lastOffsets i get it now i need to get the consumed offsets to calculate the difference public ResponseEntity<Offsets> deltaoffsets (@RequestParam( name = "groupId") String groupId, @RequestParam( name = "topic") String topic) { Map<String,Object>

Calculate delta Offsets Kafka Java

别来无恙 提交于 2021-02-11 16:38:06
问题 In a spring project i used Kafka and now I want to make a method which takes "TopicName" and "GroupeId" as parameters and calculate the difference between "Lastoffsets of the topic partitions" and the "offsets consumed by the group" for the lastOffsets i get it now i need to get the consumed offsets to calculate the difference public ResponseEntity<Offsets> deltaoffsets (@RequestParam( name = "groupId") String groupId, @RequestParam( name = "topic") String topic) { Map<String,Object>

Calculate delta Offsets Kafka Java

百般思念 提交于 2021-02-11 16:37:15
问题 In a spring project i used Kafka and now I want to make a method which takes "TopicName" and "GroupeId" as parameters and calculate the difference between "Lastoffsets of the topic partitions" and the "offsets consumed by the group" for the lastOffsets i get it now i need to get the consumed offsets to calculate the difference public ResponseEntity<Offsets> deltaoffsets (@RequestParam( name = "groupId") String groupId, @RequestParam( name = "topic") String topic) { Map<String,Object>

When setting EmbeddedServletContainerFactory with camunda spring boot ProcessEngine bean goes missing

萝らか妹 提交于 2021-02-11 15:56:35
问题 when I add the following bean to my Spring boot with camunda process engine (using camunda-bpm-spring-boot-starter): @Bean public EmbeddedServletContainerFactory servletContainerFactory() { return new TomcatEmbeddedServletContainerFactory() { @Override protected TomcatEmbeddedServletContainer getTomcatEmbeddedServletContainer( Tomcat tomcat) { I get the following: Spring-Boot: (v1.4.3.RELEASE) Camunda BPM: (v7.6.0) Camunda BPM Spring Boot Starter: (v2.0.0) 2017-01-25 12:44:31.693 INFO 6816 --

When setting EmbeddedServletContainerFactory with camunda spring boot ProcessEngine bean goes missing

为君一笑 提交于 2021-02-11 15:55:26
问题 when I add the following bean to my Spring boot with camunda process engine (using camunda-bpm-spring-boot-starter): @Bean public EmbeddedServletContainerFactory servletContainerFactory() { return new TomcatEmbeddedServletContainerFactory() { @Override protected TomcatEmbeddedServletContainer getTomcatEmbeddedServletContainer( Tomcat tomcat) { I get the following: Spring-Boot: (v1.4.3.RELEASE) Camunda BPM: (v7.6.0) Camunda BPM Spring Boot Starter: (v2.0.0) 2017-01-25 12:44:31.693 INFO 6816 --

Kafka messages getting lost when consumer goes down

人盡茶涼 提交于 2021-02-11 15:47:23
问题 Hello I am writing a kafka consumer-producer using spring cloud stream . Inside my consumer I save my data to a database , if the database goes down I will exit the application manually .After restarting application if the database is still down as a result the application gets stopped again . Now if i restart the application for the third time the messages received in the middle interval(the two failures) are lost, kafka consumer takes the latest message , also it skips the message on which

How can I make Springboot-annotated classes load properly when they are in a library?

依然范特西╮ 提交于 2021-02-11 15:45:50
问题 I have a working Spring Boot application which includes a class like this: @RestController @Validated @RequestMapping("/HelloWorld") public class HelloWorldController { private static int foo = getFoo (); private static int getFoo () { System.out.println ("HelloWorldController getFoo"); return 0; } public HelloWorldController () { System.out.println ("HelloWorldController Constructor"); } @GetMapping("/get") public HelloWorld root () { return new HelloWorld ("Hello, world!"); } } The /get