Spring boot – Request method ‘POST’ not supported. Tried everything

Following might help. While you deploy the application, spring boot displays all the available services on the console. Check the POST method to create is being displayed or not. Check that there shouldn’t be any contradiction with other services. GET/PUT/POST If there are services not deployed, try adding ‘/’ before other services – GET, PUT, … Read more

org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set

First remove all of your configuration Spring Boot will start it for you. Make sure you have an application.properties in your classpath and add the following properties. spring.datasource.url=jdbc:postgresql://localhost:5432/teste?charSet=LATIN1 spring.datasource.username=klebermo spring.datasource.password=123 spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect spring.jpa.show-sql=false spring.jpa.hibernate.ddl-auto=create If you really need access to a SessionFactory and that is basically for the same datasource, then you can do the following (which is also documented here although … Read more

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘demoRestController’

Your DemoApplication class is in the com.ag.digital.demo.boot package and your LoginBean class is in the com.ag.digital.demo.bean package. By default components (classes annotated with @Component) are found if they are in the same package or a sub-package of your main application class DemoApplication. This means that LoginBean isn’t being found so dependency injection fails. There are a couple of ways to solve your problem: Move LoginBean into com.ag.digital.demo.boot or a sub-package. Configure … Read more

Web server failed to start. Port 8080 was already in use. Spring Boot microserviceWeb server failed to start. Port 8080 was already in use. Spring Boot microservice

If you don’t want the embedded server to start, just set the following property in you application.properties (or .yml): spring.main.web-application-type=none If your classpath contains the necessary bits to start a web server, Spring Boot will automatically start it. To disable this behaviour configure the WebApplicationType in your application.properties Source: https://docs.spring.io/spring-boot/docs/current/reference/html/howto-embedded-web-servers.html If you application really is a Web application, then you can … Read more

Web server failed to start. Port 8080 was already in use. Spring Boot microservice

If you don’t want the embedded server to start, just set the following property in you application.properties (or .yml): spring.main.web-application-type=none If your classpath contains the necessary bits to start a web server, Spring Boot will automatically start it. To disable this behaviour configure the WebApplicationType in your application.properties Source: https://docs.spring.io/spring-boot/docs/current/reference/html/howto-embedded-web-servers.html If you application really is a Web application, then you can … Read more

How to resolve Unable to load authentication plugin ‘caching_sha2_password’ issue

Starting with MySQL 8.0.4, they have changed the default authentication plugin for MySQL server from mysql_native_password to caching_sha2_password. You can run the below command to resolve the issue. sample username / password => student / pass123 ALTER USER ‘student’@’localhost’ IDENTIFIED WITH mysql_native_password BY ‘pass123’; Refer the official page for details: MySQL Reference Manual

What is the proper annotation since @SpringApplicationConfiguration, @WebIntegration, is deprecated in Spring Boot Framework?

Take a look into JavaDocs of deprecated classes: * @deprecated as of 1.4 in favor of * {@link org.springframework.boot.test.context.SpringBootTest} with * {@code webEnvironment=RANDOM_PORT} or {@code webEnvironment=DEFINED_PORT}. */ … @Deprecated public @interface WebIntegrationTest { * @deprecated as of 1.4 in favor of {@link SpringBootTest} or direct use of * {@link SpringBootContextLoader}. */ … @Deprecated public @interface … Read more