Was recently following this tutorial : https://examples.javacodegeeks.com/enterprise-java/spring/mvc/spring-mvc-hibernate-tutorial/ , I have followed everything mentioned there but when I go access my app it just shows a 404 with message "The requested resource is not available."
I have already made sure my app compiles and no error were found, I wonder what could be wrong?
also where should i look at for integrating spring 4 with hibernate?
thanks
Related
I have migrated all libraries for Spring4.x and hibernate3.x to Hibernate 5 and spring 5.3.19. I have below line of code in my configuration file
bean class="org.springframework.web.servlet.mvc.support.ControllerClassNameHandlerMapping"/> with this it's throwing error class not found. I understood it's deprecated in latest spring. But what is the alternative for this in latest spring version.
After commenting the above line in my configuration file, Server is started successfully But when I hit URL I am getting below error.
HTTP Status 404 – Not Found
Type Status Report
Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.
Apache Tomcat/9.0.43.
I am trying to run a struts 2 application in spring boot provided embedded tomcat, I have managed to do so following the link https://jgalacambra.wordpress.com/2016/06/13/spring-boot-and-struts-2/. The application is working, however I am not able to get through the custom page error routing based on http error code which was configured earlier in web.xml. I have tried below solutions so far and none of them seems to work as I keep getting default tomcat error page for 404.
Things I have tried so far:
1.Disabled white label error page using.
"server.error.whitelabel.enabled=false"
2.created public/error folder in src/main/resouces and placed all html error code related html files there.
3.Also tried creating templates folder under src/main/resources and placed http error code files there.
4.I have also configured my filterregistration bean with below setting.
registration.setDispatcherTypes(EnumSet.allOf(DispatcherType.class));
Can someone please help what needs to be done for the error routing to work???
I created one micro service with spring boot, I don't have resource folder and i wanted to add swagger support. So I followed as per document
So
Added swagger dependency.
Added docker class as it is
Added swagger's ui dependency
Results
http://localhost:port/myservice/v2/api-docs ->
Response is as per expectation.
http://localhost:port/myservice/v2/api-docs ->
Response is as per expectation.
But
http://localhost:port/myservice/swagger-ui.html ->
Not expected response, on browser console i am getting error
GET http://localhost:port/myservice/configuration/ui 404 (Not Found)
As its microservice, I don't have #EnableWebMvc class.
What Am I missing ?
I had the same problem. Downgrading springfox-swagger-ui to 2.2.2 fixed my problem (as mentioned in the comments by sailor.
This question already has answers here:
Why does Spring MVC respond with a 404 and report "No mapping found for HTTP request with URI [...] in DispatcherServlet"?
(13 answers)
Closed 5 years ago.
i am not able to figure out how to solve 404 error in running an spring mvc application .
can some one please guide me how to avoid 404 error in general for spring mvc application without using annotation configuration rather xml configuaration .
Please also let me know of working war file or zip which i can import in eclipse for spring mvc directly and learn about the components .
Thanks
Prakaash
HTTP 404 mean that the requested resource (url) is not found.
In most cases either:
Your Application is not really started
Your Application is mapped to an complete different url than you expected
There is no handler for the requested url in the application
So in general: 404 is not a error by itself, in the most cases it is a bug in your application or in your understanding of how it works.
But you will not get an better answer, as long as you do not post more details about your application, as well as the URL you try to invoke.
Iam new to Spring framework. Iam on following link:
http://www.springsource.org/spring-data/mongodb
When I click "API JAVADOC", I get 404 error on following link.
http://static.springsource.org/spring-data/data-mongodb/docs/current/apidocs/
Can some one guide me what is wrong in url and how it can be rectified.
Thanks in advance
The latest javadoc can always be found under http://static.springsource.org/spring-data/data-mongodb/docs/current/api/. I've fixed the broken link on the Spring Data MongoDB project homepage.
The main directory containing all docs is here
So you can go to docs for any version. For example for 1.1.0.GA