Support for Java 11

This commit is contained in:
Paulo Gustavo Veiga
2020-11-06 21:35:54 -08:00
parent 542c0c33e0
commit ad9cea069a
45 changed files with 240 additions and 232 deletions

View File

@@ -1,11 +1,8 @@
<?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-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd">
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
<bean id="wiseDataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="${database.driver}"/>
@@ -16,7 +13,7 @@
<property name="validationQuery" value="${database.validation.query}"/>
</bean>
<!--Descoment this lines for production environments -->
<!--Disconnect this lines for production environments -->
<!--<bean id="wiseDataSource" class="org.springframework.jndi.JndiObjectFactoryBean">-->
<!--<property name="jndiName">-->
<!--<value>java:comp/env/jdbc/wisemapping</value>-->

View File

@@ -3,7 +3,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd">
http://www.springframework.org/schema/beans/spring-beans.xsd">
<beans>
<bean id="userManager" class="com.wisemapping.dao.UserManagerImpl">
<property name="hibernateTemplate" ref="hibernateTemplate"/>

View File

@@ -6,11 +6,11 @@
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/context/spring-context-4.2.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd">
http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd">
<context:component-scan base-package="com.wisemapping.rest"/>
<context:annotation-config/>
@@ -50,8 +50,12 @@
</property>
</bean>
<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
<property name="defaultContentType" value="application/json"/>
<bean id="contentNegotiationManager" class="org.springframework.web.accept.ContentNegotiationManagerFactoryBean">
<property name="favorParameter" value="true"/>
<property name="parameterName" value="mediaType"/>
<property name="defaultContentType" value="application/json" />
<property name="useJaf" value="false" />
<property name="mediaTypes">
<map>
<entry key="xml" value="application/xml"/>
@@ -68,6 +72,10 @@
<entry key="mmap" value="application/vnd.mindjet.mindmanager"/>
</map>
</property>
</bean>
<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
<property name="contentNegotiationManager" ref="contentNegotiationManager"/>
<property name="viewResolvers">
<list>
<bean class="org.springframework.web.servlet.view.BeanNameViewResolver"/>
@@ -75,7 +83,7 @@
</property>
<property name="defaultViews">
<list>
<bean class="org.springframework.web.servlet.view.json.MappingJacksonJsonView">
<bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView">
<property name="extractValueFromSingleKeyModel" value="true"/>
</bean>
<bean class="org.springframework.web.servlet.view.xml.MarshallingView">

View File

@@ -4,9 +4,9 @@
xmlns:sec="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.2.xsd">
http://www.springframework.org/schema/security/spring-security-4.2.xsd">
<sec:authentication-manager alias="authenticationManager">
<sec:authentication-provider ref="dbAuthenticationProvider"/>

View File

@@ -3,9 +3,9 @@
xmlns:sec="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.2.xsd">
http://www.springframework.org/schema/security/spring-security-4.2.xsd">
<sec:authentication-manager>

View File

@@ -4,9 +4,9 @@
xmlns:sec="http://www.springframework.org/schema/security"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.2.xsd">
http://www.springframework.org/schema/security/spring-security-4.2.xsd">
<sec:http pattern="/css/**" security="none"/>
<sec:http pattern="/js/**" security="none"/>
@@ -17,7 +17,7 @@
<sec:http pattern="/c/login" security="none"/>
<sec:http pattern="/c/loginopenid" security="none"/>
<sec:http pattern="/c/user/registration" security="none"/>
<sec:http pattern="/c/user/resetpassword" security="none"/>
<sec:http pattern="/c/user/resetPassword" security="none"/>
<sec:http pattern="/c/home" security="none"/>
<sec:http pattern="/c/maps/*/embed" security="none"/>
@@ -36,13 +36,18 @@
<sec:http use-expressions="true" create-session="stateless" pattern="/service/**">
<sec:csrf disabled="true"/>
<sec:intercept-url pattern="/service/admin/users/**" access="isAuthenticated() and hasRole('ROLE_ADMIN')"/>
<sec:intercept-url pattern="/service/admin/database/**" access="isAuthenticated() and hasRole('ROLE_ADMIN')"/>
<sec:intercept-url pattern="/service/**" access="isAuthenticated() and hasRole('ROLE_USER')"/>
<sec:http-basic/>
</sec:http>
<sec:http use-expressions="true" access-denied-page="/c/login">
<sec:http use-expressions="true">
<sec:csrf disabled="true"/>
<sec:access-denied-handler error-page="/c/login"/>
<sec:intercept-url pattern="/c/restful/admin/users/**" access="isAuthenticated() and hasRole('ROLE_ADMIN')"/>
<sec:intercept-url pattern="/c/restful/admin/database/**" access="isAuthenticated() and hasRole('ROLE_ADMIN')"/>
<sec:intercept-url pattern="/c/**/*" access="isAuthenticated() and hasRole('ROLE_USER')"/>
@@ -51,7 +56,7 @@
authentication-success-handler-ref="authenticationSuccessHandler"
always-use-default-target="false"
authentication-failure-url="/c/login?login_error=2"
login-processing-url="/c/j_spring_security_check"/>
login-processing-url="/c/perform-login"/>
<sec:openid-login user-service-ref="userDetailsService"
authentication-failure-url="/c/login.jsp?login_error=true"

View File

@@ -3,7 +3,9 @@
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-3.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd">
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.2.xsd">
<context:property-placeholder location="/WEB-INF/app.properties" ignore-unresolvable="true"/>

View File

@@ -5,11 +5,11 @@
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd
http://www.springframework.org/schema/context/spring-context-4.2.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd">
http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd">
<context:component-scan base-package="com.wisemapping.webmvc"/>
<context:annotation-config/>

View File

@@ -21,13 +21,13 @@
<div class="row jumbotron" id="loginPanel">
<h1><spring:message code="SIGN_IN"/></h1>
<form action="/c/j_spring_security_check" method="POST" class="form-horizontal"
<form action="/c/perform-login" method="POST" class="form-horizontal"
id="loginForm">
<div class="form-group">
<label class="col-md-3 control-label" for="email"><spring:message code="EMAIL"/>: </label>
<div class="col-md-9">
<input type='email' tabindex="1" id="email" name='j_username' required="required"
<input type='email' tabindex="1" id="username" name='username' required="required"
class="form-control"/>
</div>
</div>
@@ -35,7 +35,7 @@
<label class="col-md-3 control-label" for="password"><spring:message code="PASSWORD"/>: </label>
<div class="col-md-9">
<input type='password' tabindex="2" id="password" name='j_password' required="required"
<input type='password' tabindex="2" id="password" name='password' required="required"
class="form-control"/>
</div>
</div>

View File

@@ -15,7 +15,7 @@
<p><spring:message code="FORGOT_PASSWORD_MESSAGE"/></p>
<form:form method="post" commandName="resetPassword" class="form-horizontal">
<form:form method="post" modelAttribute="resetPassword" class="form-horizontal">
<label for="email" class="col-md-2 control-label"><spring:message code="EMAIL"/>: </label>
<div class="col-md-5">
<input id="email" type="email" required="required" name="email" class="form-control"/>

View File

@@ -4,7 +4,7 @@
<h1><spring:message code="USER_REGISTRATION"/></h1>
<p><spring:message code="REGISTRATION_TITLE_MSG"/></p>
<form:form method="post" commandName="user" class="form-horizontal">
<form:form method="post" modelAttribute="user" class="form-horizontal">
<div class="form-group">
<label for="email" class="col-md-2 control-label"><spring:message code="EMAIL"/>: </label>
<div class="col-md-5">