diff --git a/Messaging/src/RabbitMQWeb/Program.cs b/Messaging/src/RabbitMQWeb/Program.cs index b93957f7..0eb26d0f 100644 --- a/Messaging/src/RabbitMQWeb/Program.cs +++ b/Messaging/src/RabbitMQWeb/Program.cs @@ -13,9 +13,6 @@ namespace RabbitMQWeb public static IHostBuilder CreateHostBuilder(string[] args) => RabbitHost.CreateDefaultBuilder() - .ConfigureWebHostDefaults(webBuilder => - { - webBuilder.UseStartup(); - }); + .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup(); }); } -} +} \ No newline at end of file diff --git a/Messaging/src/RabbitMQWeb/Services/RabbitListener.cs b/Messaging/src/RabbitMQWeb/Services/RabbitListener.cs index 2b6602c2..727a0e0b 100644 --- a/Messaging/src/RabbitMQWeb/Services/RabbitListener.cs +++ b/Messaging/src/RabbitMQWeb/Services/RabbitListener.cs @@ -4,36 +4,25 @@ using Steeltoe.Messaging.RabbitMQ.Attributes; namespace RabbitMQWeb.Services { - /// - /// A service class that will handle incoming messages - /// public class RabbitListener { - private ILogger _logger; + public RabbitListener(ILogger logger) { _logger = logger; } - /// - /// Process any messages put on the INFERRED_FOO_QUEUE - /// - /// [RabbitListener(Queues.InferredRabbitQueue)] public void ListenForAFoo(RabbitMessage rabbitMessage) { _logger.LogInformation("Expected a Foo, got a {Message}", rabbitMessage); } - /// - /// Process any messages put on the INFERRED_BAR_QUEUE - /// - /// [RabbitListener(Queues.InferredLongEaredRabbitQueue)] public void ListenForAFoo(LongEaredRabbitMessage longEaredRabbitMessage) { _logger.LogInformation("Expected a Bar, got a {Message}", longEaredRabbitMessage); } } -} +} \ No newline at end of file diff --git a/Messaging/src/RabbitMQWeb/Startup.cs b/Messaging/src/RabbitMQWeb/Startup.cs index 9170397a..c170aa1d 100644 --- a/Messaging/src/RabbitMQWeb/Startup.cs +++ b/Messaging/src/RabbitMQWeb/Startup.cs @@ -47,10 +47,7 @@ namespace RabbitMQWeb app.UseAuthorization(); - app.UseEndpoints(endpoints => - { - endpoints.MapControllers(); - }); + app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); } } -} +} \ No newline at end of file