Polish
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package sample.kafka;
|
||||
|
||||
import org.springframework.kafka.annotation.KafkaListener;
|
||||
@@ -26,4 +27,4 @@ class Consumer {
|
||||
System.out.println("Received sample message [" + message + "]");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package sample.kafka;
|
||||
|
||||
import org.springframework.kafka.core.KafkaTemplate;
|
||||
@@ -32,4 +33,4 @@ public class Producer {
|
||||
System.out.println("Sent sample message [" + message + "]");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,12 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package sample.kafka;
|
||||
|
||||
import org.springframework.boot.ApplicationRunner;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
@SpringBootApplication
|
||||
|
||||
@@ -41,11 +41,7 @@ public class SampleMessage {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
final StringBuilder sb = new StringBuilder("SampleMessage{");
|
||||
sb.append("id=").append(this.id);
|
||||
sb.append(", message='").append(this.message).append('\'');
|
||||
sb.append('}');
|
||||
return sb.toString();
|
||||
return "SampleMessage{id=" + this.id + ", message='" + this.message + "'}";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user