Skip to content
Advertisement

Tag: spring-boot

What is the use of @EnableWebSecurity in Spring?

As per the Spring documantation: Add this annotation to an @Configuration class to have the Spring Security configuration defined in any WebSecurityConfigurer or more likely by extending the WebSecurityConfigurerAdapter base class and overriding individual methods: Or As this @EnableWebSecurity depicts, is used to enable SpringSecurity in our project. But my question is that even if I don’t annotate any of

Spring Boot Application is starting up from a JUnit test but unable to access through URL

I have a JUnit Test that starts my spring boot appcliation (Application.java). If I run the JUnit test, Application is successfully starting up, but not accessible through url Application Logs: When I tried to access the application through url ‘http://localhost:8080/process’, It says Site can’t be reached. Answer Why would you do such thing? This should be a unit test and

Spring boot: how to match all routes?

I’m developing a simple web application on Spring boot 1.5.3 and I need all the routes to send static index.html file. Now, I have this: My application contains only static assets and REST API. But the problem is that the controller shown above only matches the first-level url like /index, /department etc. I want to match all url levels like

Spring boot – Cannot turn off logging

I am trying to turn off the console output in STS for a spring boot application using the application.properties file. Setting the value logging.level.root does seem to have some effect but I can never turn it off completely and nor can I turn off the auto configuration report output. The banner does get turned off by the property spring.main.banner-mode. For

Spring Boot not recognizing application.properties file

I’m trying to configure a DynamoDb client with Spring Boot, and placed my endpoints and configuration information in my resources/application.properties file. However, Spring Boot does not seem to pick up these properties. It does pick up the “server.default” key that I have stored in the same file, so it is definitely recognizing the the file itself. Here is my application.properties

Advertisement