package com.mirkoebert.weather.tinkerforge;

import com.mirkoebert.weather.Weather;
import com.mirkoebert.weather.WeatherProvider;

import java.util.Optional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class TinkerforgeWeatherService implements WeatherProvider{
    
    @Autowired
    private TinkerforgeWeather weatherModel;
    

    public TinkerforgeWeather getWeather2() {
        return weatherModel;
    }
    
    public Weather getWeather() {
        Weather weather = new Weather();
        weather.setAirpressure(Optional.of((float)weatherModel.getAirPressureQFE()));
        weather.setTempIn((float) weatherModel.getTempIn());
        weather.setHumidityIn((float) weatherModel.getHumdidity());
        return weather;
    }
}

@@ -184,100 +184,92 @@
 ork.
-beans.factory.annotation.Autowired;%0Aimport org.springframework.stereotype.Service;%0A%0A@Service
+stereotype.Service;%0A%0Aimport lombok.AllArgsConstructor;%0A%0A@Service%0A@AllArgsConstructor
 %0Apub
@@ -341,23 +341,8 @@
    %0A
-    @Autowired%0A
     
@@ -349,19 +349,25 @@
 private 
-T
+f
 in
+al Tin
 kerforge
@@ -377,89 +377,8 @@
 ther
- weatherModel;%0A    %0A%0A    public TinkerforgeWeather getWeather2() %7B%0A        return
  wea
@@ -392,17 +392,16 @@
 el;%0A    
-%7D
 %0A    %0A  

replace autowire with lombock and autowire