Skip to content

Commit

Permalink
Removed reliance on generic types
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmsilva committed Oct 8, 2018
1 parent 075363b commit 44358ee
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,39 @@
<val val="&quot;WeakerAccess&quot;"/>
</annotation>
</item>
<item
name='com.github.jpmsilva.jsystemd.SystemdAutoConfiguration org.springframework.context.ApplicationListener&lt;org.springframework.boot.context.event.ApplicationReadyEvent&gt; systemdApplicationReadyListener(com.github.jpmsilva.jsystemd.Systemd) 0'>
<item name='com.github.jpmsilva.jsystemd.SystemdAutoConfiguration SystemdAutoConfiguration(com.github.jpmsilva.jsystemd.Systemd) 0'>
<annotation name='java.lang.SuppressWarnings'>
<val val="&quot;SpringJavaInjectionPointsAutowiringInspection&quot;"/>
</annotation>
</item>
<item name='com.github.jpmsilva.jsystemd.SystemdAutoConfiguration void started(org.springframework.boot.context.event.ApplicationReadyEvent) 0'>
<annotation name='java.lang.SuppressWarnings'>
<val val="&quot;unused&quot;"/>
</annotation>
</item>
<item
name='com.github.jpmsilva.jsystemd.SystemdAutoConfiguration.SystemdStatusProviderConfiguration SystemdStatusProviderConfiguration(com.github.jpmsilva.jsystemd.Systemd, org.springframework.beans.factory.ObjectProvider&lt;java.util.List&lt;com.github.jpmsilva.jsystemd.SystemdNotifyStatusProvider&gt;&gt;) 0'>
<annotation name='java.lang.SuppressWarnings'>
<val val="&quot;SpringJavaInjectionPointsAutowiringInspection&quot;"/>
</annotation>
</item>
<item
name='com.github.jpmsilva.jsystemd.SystemdAutoConfiguration.SystemdStatusProviderConfiguration SystemdStatusProviderConfiguration(com.github.jpmsilva.jsystemd.Systemd, org.springframework.context.ConfigurableApplicationContext, org.springframework.beans.factory.ObjectProvider&lt;java.util.List&lt;com.github.jpmsilva.jsystemd.SystemdNotifyStatusProvider&gt;&gt;) 0'>
<annotation name='java.lang.SuppressWarnings'>
<val val="&quot;SpringJavaInjectionPointsAutowiringInspection&quot;"/>
</annotation>
</item>
<item
name='com.github.jpmsilva.jsystemd.SystemdNotifyApplicationRunStatusProvider.ApplicationState'>
<annotation name='java.lang.SuppressWarnings'>
<val val="&quot;unused&quot;"/>
</annotation>
</item>
<item name='com.github.jpmsilva.jsystemd.SystemdNotifyTomcatStatusProvider SystemdNotifyTomcatStatusProvider()'>
<annotation name='java.lang.SuppressWarnings'>
<val val="&quot;WeakerAccess&quot;"/>
</annotation>
</item>
<item
name='com.github.jpmsilva.jsystemd.SystemdSpringApplicationRunListener SystemdSpringApplicationRunListener(org.springframework.boot.SpringApplication, java.lang.String[]) 1'>
<annotation name='java.lang.SuppressWarnings'>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.context.event.ApplicationReadyEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.event.EventListener;
import org.springframework.core.annotation.Order;

/**
Expand All @@ -47,10 +47,16 @@
@ConditionalOnSystemd
public class SystemdAutoConfiguration {

@Bean
private final Systemd systemd;

@Autowired
ApplicationListener<ApplicationReadyEvent> systemdApplicationReadyListener(Systemd systemd) {
return event -> systemd.ready();
public SystemdAutoConfiguration(Systemd systemd) {
this.systemd = systemd;
}

@EventListener
public void started (ApplicationReadyEvent event) {
systemd.ready();
}

@Bean
Expand Down

0 comments on commit 44358ee

Please sign in to comment.