Git Product home page Git Product logo

Comments (8)

mrm9084 avatar mrm9084 commented on July 19, 2024

@SriPalla, can you clean provider the versions of our Spring libraries you are using. Also, which version of Spring AOP are you using, It seems like it is an issue with Spring AOP and our library not Spring Actuator.

from appconfiguration.

SriPalla avatar SriPalla commented on July 19, 2024

@mrm9084 Springboot version: 3.2.3 spring-aop: 6.1.4
The issue is being observed after adding springboot actuator dependency along with spring aop

from appconfiguration.

jimmyca15 avatar jimmyca15 commented on July 19, 2024

It seems like it is an issue with Spring AOP and our library

@mrm9084 were you able to confirm this?

from appconfiguration.

mrm9084 avatar mrm9084 commented on July 19, 2024

So where I've seen this issue before is when Spring Native gets involved and it tries to Mock out one of our classes that's marked as final. I'm trying to repo, but haven't had any luck yet.

from appconfiguration.

mrm9084 avatar mrm9084 commented on July 19, 2024

@SriPalla I'm having trouble replicating this, do you have a sample that replicates the issue. Also, the bug states that the application fails to start, but the top of the stack trace says

org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext:632 : Exception encountered during context initialization - cancelling refresh attempt: 

Which would only happen if the original started happened.

from appconfiguration.

mrm9084 avatar mrm9084 commented on July 19, 2024

@SriPalla, you you take that setup, with minimal app, (plus an empty config for GraphQL):

package com.example.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class DemoApplication {

	public static void main(String[] args) {
		SpringApplication.run(DemoApplication.class, args);
	}

}

It starts up fine, with App Configuration enabled. I even added an endpoint to trigger refresh and it works fine. Are you doing something extra besides just running the Gradle build?

from appconfiguration.

SriPalla avatar SriPalla commented on July 19, 2024

Issue is being observed when you add custom AOP for example loging request and response header around spring web Request mapping and then adding actuator dependency will fail server startup

from appconfiguration.

mrm9084 avatar mrm9084 commented on July 19, 2024

@SriPalla. Thanks. Was able to replicate. Fix is in PR. I have a workaround below.

Instead use:

com.azure.spring:spring-cloud-azure-appconfiguration-config not starter or web version. This version was created for just Spring Boot libraries and doesn't have the auto refresh feature built in. If you require the refresh feature, you can use it but manually. See: https://learn.microsoft.com/en-us/azure/azure-app-configuration/enable-dynamic-configuration-java-spring-app?tabs=spring-boot-3#use-manual-refresh.

from appconfiguration.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.