I'm not much of a Spring guru and was wondering if someone can help me.
I'm going through a Spring Security example found here: https://github.com/FutureProcessing/spring-boot-security-example
I have successfully loaded the tomcat server by running the Application.java file. I did that by Right-Clicking on Application.java in Intellij and then 'Run Application.main()'.
It had given me an error as Spring Boot was not picking up the application.properties file so I had to include an xml config file which is display below and this fixed it:
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd">
<context:property-placeholder location="classpath:application.properties"/>
</beans>
Since the project does not contain a front end for testing purposes, I'm trying to run the SecurityTest.java for this project on github that shows how Spring Security works. When I run SecurityTest.java, I got the following exceptions:
Testing started at 06:55 PM ...
06:55:56 PM: Executing external tasks 'cleanTest test --tests com.futureprocessing.integration.SecurityTest'...
:cleanTest UP-TO-DATE
:compileJava FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileJava'.
> invalid source release: 1.8
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 0.287 secs
invalid source release: 1.8
I then followed the advice of this stackoverflow post: Error:java: invalid source release: 8 in Intellij. What does it mean? and did all 4 steps and the test still doesn't run.
I'm not sure what I'm doing wrong. I'm running the original code as per github and I only included the xml config file which I have pasted above.
When I run the SecurityTest.java, it also gives me a message that says 'Empty test suite' which I'm unsure about.