Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
@SpringBootApplication enables component scanning (which was not enabled before). To prevent component scanning from picking up Spring Boot Admin's auto-configuration classes, the package of the samples had to be changed.
  • Loading branch information
hzpz committed Apr 12, 2024
1 parent 753b09e commit bbbaef2
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
services:
consul:
image: library/consul
image: hashicorp/consul
ports:
- "8500:8500"
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
</execution>
</executions>
<configuration>
<mainClass>de.codecentric.boot.admin.SpringBootAdminConsulApplication</mainClass>
<mainClass>de.codecentric.boot.admin.sample.SpringBootAdminConsulApplication</mainClass>
<addResources>false</addResources>
</configuration>
</plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
* limitations under the License.
*/

package de.codecentric.boot.admin;
package de.codecentric.boot.admin.sample;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
Expand All @@ -33,8 +33,7 @@
import de.codecentric.boot.admin.server.config.AdminServerProperties;
import de.codecentric.boot.admin.server.config.EnableAdminServer;

@Configuration(proxyBeanMethods = false)
@EnableAutoConfiguration
@SpringBootApplication
@EnableDiscoveryClient
@EnableAdminServer
public class SpringBootAdminConsulApplication {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package de.codecentric.boot.admin;
package de.codecentric.boot.admin.sample;

import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;
Expand Down

0 comments on commit bbbaef2

Please sign in to comment.