Skip to content

Commit

Permalink
Fix client/server mode
Browse files Browse the repository at this point in the history
  • Loading branch information
zapek committed Dec 21, 2024
1 parent 390b006 commit cace63f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.web.embedded.tomcat.TomcatConnectorCustomizer;
import org.springframework.context.annotation.Configuration;
Expand All @@ -50,10 +50,10 @@
import java.util.Date;

/**
* Strongly inspired from https://valb3r.github.io/letsencrypt-helper/ by Valentyn Berezin.
* Strongly inspired from <a href="https://valb3r.github.io/letsencrypt-helper/">let's encrypt helper</a> by Valentyn Berezin.
*/
@Configuration
@ConditionalOnProperty(value = "server.ssl.enabled", havingValue = "true")
@ConditionalOnExpression("'${server.ssl.enabled}' == 'true' && '${spring.main.web-application-type}' != 'none'")
public class SelfCertificateConfiguration implements TomcatConnectorCustomizer
{
private static final Logger log = LoggerFactory.getLogger(SelfCertificateConfiguration.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

package io.xeres.app.configuration;

import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.config.annotation.EnableWebSocket;
Expand All @@ -30,6 +31,7 @@

@Configuration
@EnableWebSocket
@ConditionalOnProperty(value = "spring.main.web-application-type", havingValue = "servlet")
public class WebSocketConfiguration implements WebSocketConfigurer
{
@Bean
Expand Down

0 comments on commit cace63f

Please sign in to comment.