昆山j(luò)ava學(xué)習(xí)需要多長時間_JAVA培訓(xùn)
¥詳詢
班制:周末班
蘇州其然軟件開發(fā)趙艷敏高級講師
從事設(shè)計行業(yè)多年,有著豐富的設(shè)計和動畫制作經(jīng)驗。曾參與中國電信天翼 手機(jī)網(wǎng)及天翼手機(jī)DIY等多個項目的設(shè)計,動畫,及As開發(fā)。項目經(jīng)驗豐富。曾在卡酷動畫衛(wèi)視下屬公司擔(dān)任高級動畫師一職,參與多部動畫片的制作 。對動畫也有較高的造詣。
精通Flash、After Effects、Photoshop、Illustrator、ActionScript 2.0/3.0、Edius、CoolEdit、Axure RP、DIV CSS等相關(guān)技術(shù)。
講課有自己的風(fēng)格,思維活躍,條理清晰講課注重細(xì)節(jié),由簡入繁。本著以 學(xué)生學(xué)會為目的,更注重理論與實踐相結(jié)合。
自學(xué)java與java培訓(xùn)該如何選擇
從事IT培訓(xùn)行業(yè)這些年,身邊經(jīng)常有朋友來咨詢,問現(xiàn)在是否可以加入這個高薪行業(yè),Java學(xué)習(xí)難不難,需要哪些條件?
在軟件開發(fā)設(shè)計行業(yè)當(dāng)中,使用**多的編程語言就屬Java軟件開發(fā)了,很多人都想在Java編程開發(fā)領(lǐng)域?qū)で笠环莨ぷ鳌?/span>
Java是當(dāng)前世界上比較流行的計算機(jī)編程語言,Java徹底改變了人們的生活,國內(nèi)的開發(fā)人才需求量仍然在不斷的增長,主要原因還是在于移動互聯(lián)網(wǎng)的快速發(fā)展,衍生出一大批的新生企業(yè),創(chuàng)業(yè)公司,預(yù)計在未來5年內(nèi)Java軟件開發(fā)人才的需求將會遠(yuǎn)大于供給,其中java程序員、java工程師**為缺乏。
自學(xué)java與java培訓(xùn)是兩個繞不開的話題,兩者的區(qū)別,前者知識是自己搜尋的,買書看或者網(wǎng)上找視頻看,而后者,技術(shù)知識是老師教的,作為一個普通大學(xué)生實際上任何人都能夠自學(xué),只不過聰明程度和堅持的時間長短不同,花費的時間長一點短一點而已。
學(xué)習(xí)關(guān)乎到時間和金錢,沒有效果和質(zhì)量的培訓(xùn),其實是沒有任何意義的。Java培訓(xùn)班有哪些呢?市面上的Java培訓(xùn)良莠不齊,選擇時應(yīng)該慎重些。Java致力于打造符合企業(yè)需求的全能型人才。課程定位定位中高級JAVA開發(fā)工程師,課程內(nèi)容涉及面廣,內(nèi)容深。課程涵蓋了Java、Web,數(shù)據(jù)庫,企業(yè)流行框架,Java等企業(yè)**佳實踐、云計算大數(shù)據(jù)課程、內(nèi)容由淺入深,剖析原理,讓學(xué)員掌握實用技術(shù),做企業(yè)和社會需要的稀缺人才。
此外,Java培訓(xùn)將為你提供就業(yè)保障,開設(shè)有就業(yè)指導(dǎo)課,設(shè)有專門的就業(yè)指導(dǎo)老師,在畢業(yè)前期,畢業(yè)之際,就業(yè)老師會為你做專門的就業(yè)指導(dǎo),更有職業(yè)素養(yǎng)課程,不僅將你打造成Java開發(fā)技術(shù)達(dá)人,更是一位懂得職場之道的合格就業(yè)者。還有豐富的Java學(xué)習(xí)視頻免費為你提供學(xué)習(xí)。
Java開發(fā)體系結(jié)構(gòu)介紹 :
Java開發(fā)體系結(jié)構(gòu)介紹 :
1、類加載器:為程序的執(zhí)行加載所需要的全部類。類加載器將本地文件系 統(tǒng)的類名空間與來自遠(yuǎn)程網(wǎng)絡(luò)源的類名空間相分離,本地類總是首先被加載,以增加安全性。當(dāng)全部類被加載后,可執(zhí)行文件的存儲器格式被確定。這 時,特定的存儲器地址被分配給符號引用并創(chuàng)建檢索表格。由于存儲器格式在運行時出現(xiàn),因而Java解釋器增加了保護(hù)以防止對限制代碼區(qū)的非法進(jìn)入 。
2、字節(jié)代碼校驗器:基于代碼的規(guī)范包括語法語義的檢查以及如上所述的 安全性檢查。
3、Java運行時解釋器:它是JVM的核心內(nèi)容,實現(xiàn)把抽象的字節(jié)碼指令映射 到本地系統(tǒng)平臺下的庫引用或指令。
4、API類庫:實現(xiàn)標(biāo)準(zhǔn)Java平臺API的一系列可執(zhí)行代碼。
5、硬件本地平臺接口:提供對底層系統(tǒng)平臺資源庫調(diào)用的接口。
spring secrity 自定義驗證
>
sPRing secrity 驗證默認(rèn)是使用username和passWord。但是我項目的登錄是根據(jù)用戶的 的工號和密碼進(jìn)行驗證的,所有 有點不同。
關(guān)鍵點是 自己實現(xiàn)了 myAuthenticationProvider;
<?xml version="1.0" encoding="UTF-8"?> <beans:beans xmlns="http://www.springframework.org/schema/security" xmlns:beans="http://www.springframework.org/schema/beans" 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.0.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.2.xsd"> <global-method-security pre-post-annotations="enabled" /> <!-- HTTP安全配置 --> <http auto-config="false" entry-point-ref="authenticationEntryPoint" access-denied-page="/denied.html"> <intercept-url pattern="/login.html" access="IS_AUTHENTICATED_ANYMOUSLY"/> <intercept-url pattern="/index.html" access="IS_AUTHENTICATED_ANYMOUSLY"/> <intercept-url pattern="/m/**" access="IS_AUTHENTICATED_ANYMOUSLY"/> <intercept-url pattern="/commons/**" access="IS_AUTHENTICATED_ANYMOUSLY"/> <intercept-url pattern="/upload/**" access="IS_AUTHENTICATED_ANYMOUSLY"/> <intercept-url pattern="/cms/**" access="ROLE_USER"/> <!-- <intercept-url pattern="/adminIndex.html" access="ROLE_USER"/> --> <intercept-url pattern="/pages/*.html" access="ROLE_USER"/> <!-- logout-success-url="/login.html" --> <logout logout-url="/j_spring_security_logout" invalidate-session="true" delete-cookies="JSESSIONID" success-handler-ref="myLogoutSuccessHandler"/> <custom-filter ref="corsFilter" after="PRE_AUTH_FILTER"/> <custom-filter ref="myLoginFilter" position="FORM_LOGIN_FILTER" /> <custom-filter ref="mySecurityFilter" before="FILTER_SECURITY_INTERCEPTOR" /> </http> <beans:bean id="corsFilter" class="com.threeti.danfoss.base.filter.SecurityCorsFilter" /> <beans:bean id="sas" class="org.springframework.security.web.authentication.session.ConcurrentSessionControlStrategy"> <beans:property name="maximumSessions" value="1"></beans:property> <beans:property name="exceptionIfMaximumExceeded" value="true"></beans:property> <beans:constructor-arg name="sessionRegistry" ref="sessionRegistry"></beans:constructor-arg> </beans:bean> <beans:bean id="sessionRegistry" class="org.springframework.security.core.session.SessionRegistryImpl"></beans:bean> <beans:bean id="myLoginFilter" class="com.threeti.danfoss.base.filter.MyUsernamePasswordAuthenticationFilter"> <beans:property name="authenticationManager" ref="myAuthenticationManager"/> <beans:property name="authenticationFailureHandler" ref="failureHandler"/> <beans:property name="authenticationSuccessHandler" ref="successHandler"/> <beans:property name="sessionAuthenticationStrategy" ref="sas"></beans:property> </beans:bean> <beans:bean id="successHandler" class="com.threeti.danfoss.base.handler.MyAuthenticationSuccessHandler"> <beans:property name="defaultTargetUrl" value="/pages/menu.html#current/wind/surface/level/anim=off/overlay=misery_index/orthographic=39.08,42.42,294/loc=96.475,39.357" /> </beans:bean> <beans:bean id="failureHandler" class="com.threeti.danfoss.base.handler.MySimpleUrlAuthenticationFailureHandler"> <beans:property name="defaultFailureUrl" value="/index.html"/> </beans:bean> <beans:bean id="myLogoutSuccessHandler" class="com.threeti.danfoss.base.handler.MyLogoutSuccessHandler"> <beans:property name="defaultTargetUrl" value="/login.html"/> <!-- 下面的 是**在url參數(shù)進(jìn)行跳轉(zhuǎn) --> <!-- <property name="targetUrlParameter" value="target-url"/> <property name="redirectStrategy" ref="safeRedirectStrategy"/> --> </beans:bean> <!-- 安全的RedirectStrategy,主要是判斷跳轉(zhuǎn)地址是否在白名單中 public class SafeRedirectStrategy implements RedirectStrategy --> <!-- <beans:bean id="safeRedirectStrategy" class="com.snsxiu.job.web.security.SafeRedirectStrategy"/> --> <!-- 1.URL過濾器或方法攔截器:用來攔截URL或者方法資源對其進(jìn)行驗證,其抽象基類為AbstractSecurityInterceptor 2.資源權(quán)限獲取器:用來取得訪問某個URL或者方法所需要的權(quán)限,接口為SecurityMetadataSource 3.訪問決策器:用來決定用戶是否擁有訪問權(quán)限的關(guān)鍵類,其接口為AccessDecisionManager 調(diào)用順序為:AbstractSecurityInterceptor調(diào)用SecurityMetadataSource取得資源的所有可訪問權(quán)限, 然后再調(diào)用AccessDecisionManager來實現(xiàn)決策,確定用戶是否有權(quán)限訪問該資源。 --> <!-- 自定義的filter, 必須包含authenticationManager, accessDecisionManager, securityMetadataSource三個屬性 --> <beans:bean id="mySecurityFilter" class="com.threeti.danfoss.base.security.XaFilterSecurityInterceptor"> <beans:property name="authenticationManager" ref="myAuthenticationManager" /> <beans:property name="accessDecisionManager" ref="myAccessDecisionManager" /> <beans:property name="securityMetadataSource" ref="mySecurityMetadataSource" /> </beans:bean> <!-- 取HTTP配置中的authenticationManager 設(shè)置alias別名 --> <authentication-manager alias="myAuthenticationManager"> <authentication-provider ref="myAuthenticationProvider"/> </authentication-manager> <!-- 用戶詳細(xì)信息管理:數(shù)據(jù)源、用戶緩存(**數(shù)據(jù)庫管理用戶、角色、權(quán)限、資源) --> <beans:bean id="userDetailsManager" class="com.threeti.danfoss.base.security.XaUserDetailsService"> </beans:bean> <!-- <beans:bean class="org.springframework.security.authentication.encoding.md5PasswordEncoder" id="passwordEncoder"> </beans:bean> --> <beans:bean id="myAuthenticationProvider" class="com.threeti.danfoss.base.filter.MyAuthenticationProvider"> <!-- <beans:property name="userDetailsService" ref="userDetailsManager"/> --> <beans:constructor-arg name="userDetailsService" ref="userDetailsManager"/> <!-- <beans:property name="passwordEncoder" ref="passwordEncoder"/> --> </beans:bean> <!-- 訪問決策器,決定某個用戶具有的角色,是否有足夠的權(quán)限去訪問某個資源。 --> <beans:bean id="myAccessDecisionManager" class="com.threeti.danfoss.base.security.XaAccessDecisionManagerService" /> <!-- 資源源數(shù)據(jù)定義,將所有的資源和權(quán)限對應(yīng)關(guān)系建立起來,即定義某一資源可以被哪些角色去訪問。 --> <beans:bean id="mySecurityMetadataSource" init-method="loadResourceDefine" class="com.threeti.danfoss.base.security.XaSecurityMetadataSourceService"> </beans:bean> <beans:bean id="authenticationEntryPoint" class="org.springframework.security.web.authentication.LoginUrlAuthenticationEntryPoint"> <beans:property name="loginFormUrl" value="/login.html" /> </beans:bean> </beans:beans>
這個是我實現(xiàn)的的 myAuthenticationProvider;
package com.threeti.danfoss.base.filter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.authentication.AuthenticationProvider; import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.core.Authentication; import org.springframework.security.core.AuthenticationException; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import com.threeti.danfoss.base.exception.LoginLockException; import com.threeti.danfoss.base.repository.XaCmsUserRepository; import com.threeti.danfoss.base.util.MD5Util; public class MyAuthenticationProvider implements AuthenticationProvider{ @Autowired XaCmsUserRepository xaCmsUserRepository; private UserDetailsService userDetailsService; public MyAuthenticationProvider(UserDetailsService userDetailsService) { this.userDetailsService = userDetailsService; } public UserDetailsService getUserDetailsService() { return userDetailsService; } public void setUserDetailsService(UserDetailsService userDetailsService) { this.userDetailsService = userDetailsService; } @Override public Authentication authenticate(Authentication authentication) throws AuthenticationException { UsernamePasswordAuthenticationToken token = (UsernamePasswordAuthenticationToken) authentication; String username = token.getName(); //從數(shù)據(jù)庫找到的用戶 UserDetails userDetails = null; if(username != null) { userDetails = userDetailsService.loadUserByUsername(username); } //XaCmsUser user =xaCmsUserRepository.findByNumberAndPasswordAndStatus(userDetails.getUsername(), //MD5Util.getMD5String(userDetails.getPassword()), XaConstant.UserStatus.status_normal); if(userDetails == null) { throw new LoginLockException("賬號或者密碼錯誤"); } //數(shù)據(jù)庫用戶的密碼 String password = userDetails.getPassword(); //與authentication里面的credentials相比較 if(!password.equals(MD5Util.getMD5String((String)token.getCredentials()))) { //throw new BadCredentialsException("Invalid username/password"); throw new LoginLockException("賬號或者密碼錯誤"); } //授權(quán) return new UsernamePasswordAuthenticationToken(userDetails, password,userDetails.getAuthorities()); } @Override public boolean supports(Class<?> authentication) { return UsernamePasswordAuthenticationToken.class.equals(authentication); } }
我標(biāo)紅色的部分就是關(guān)鍵,在MyAuthenticationProvider 中注入了 UserDetailsService
,調(diào)用了loadUserByUsername(username)方法
package com.threeti.danfoss.base.security; import java.util.ArrayList; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.authority.SimpleGrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.security.core.userdetails.UsernameNotFoundException; import org.springframework.stereotype.Service; import com.threeti.danfoss.base.constant.XaConstant; import com.threeti.danfoss.base.entity.XaCmsUser; import com.threeti.danfoss.base.exception.LoginLockException; import com.threeti.danfoss.base.repository.XaCmsUserRepository; import com.threeti.danfoss.base.util.DateProcessUtil; /** * 登錄權(quán)限驗證service * @author zj * */ @Service("MsUserDetailsService") public class XaUserDetailsService implements UserDetailsService { protected static final String ROLE_PREFIX = "ROLE_"; protected static final GrantedAuthority DEFAULT_USER_ROLE = new SimpleGrantedAuthority(ROLE_PREFIX "USER"); @Autowired XaCmsUserRepository xaCmsUserRepository; public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException { XaUserDetails msUserDetails = new XaUserDetails(); try { XaCmsUser user; //List<XaCmsUser> userList = xaCmsUserRepository.findByUserName(new String(username.getBytes("ISO-8859-1"),"UTF-8"));
// 這里也是關(guān)鍵,注意,我這里是**工號進(jìn)行查詢的 List<XaCmsUser> userList = xaCmsUserRepository.findByNumber(new String(username.getBytes("ISO-8859-1"),"UTF-8")); if(userList.size() > 0 && userList.get(0).getStatus() == XaConstant.UserStatus.status_lock){ throw new LoginLockException("您輸入的賬號已被鎖定"); } /*if(userList.size() > 0 && userList.get(0).getIsAdmin() != 1){ throw new LoginAdminException("您的賬號不是管理員"); }*/ if(userList.size() > 0 && userList.get(0) != null){ user = userList.get(0); user.setLastLoginDate(DateProcessUtil.getToday(DateProcessUtil.YYYYMMDDHHMMSS)); xaCmsUserRepository.save(user); msUserDetails.setUsername(user.getNumber()); msUserDetails.setPassword(user.getPassword()); List<GrantedAuthority> authorities = new ArrayList<GrantedAuthority>(); GrantedAuthority authority = new SimpleGrantedAuthority(user.getRole().getRoleName()); authorities.add(authority); //設(shè)置用戶oauth**token訪問的權(quán)限 authorities.add(DEFAULT_USER_ROLE); authorities.add(new SimpleGrantedAuthority(ROLE_PREFIX "UNITY")); authorities.add(new SimpleGrantedAuthority(ROLE_PREFIX "MOBILE")); msUserDetails.setAuthorities(authorities); //msUserDetails.setToken(TokenCenter.issueToken(user.getUserId())); } } catch (Exception e) { e.printStackTrace(); } return msUserDetails; } }
相關(guān)推薦:
蘇州JAVA培訓(xùn) 蘇州JAVA培訓(xùn)班 蘇州JAVA培訓(xùn)機(jī)構(gòu)
體驗課預(yù)約試聽
倒計時
課程熱線:
客服在線時間:早上9點~下午6點,其他時間請在線預(yù)約報名或留言,謝謝!
熱門課程
機(jī)構(gòu)資訊
- 太倉java開發(fā)培訓(xùn)費用_太倉JAVA培訓(xùn)
- 昆山哪里有Java實戰(zhàn)培訓(xùn)學(xué)校_昆山JAVA培訓(xùn)
- 常熟學(xué)Java哪個好_常熟JAVA培訓(xùn)
- 蘇州Java培訓(xùn)課程哪個好_蘇州JAVA培訓(xùn)
- 昆山哪里有Java語言培訓(xùn)學(xué)院_昆山JAVA培訓(xùn)
- 昆山Java工程師培訓(xùn)機(jī)構(gòu)哪個好_昆山JAVA培訓(xùn)
- 常熟學(xué)習(xí)Java工程師哪里好_常熟JAVA培訓(xùn)
- 昆山Java編程課程價格_昆山JAVA培訓(xùn)
- 張家港Java開發(fā)培訓(xùn)班學(xué)費_張家港JAVA培訓(xùn)
- 太倉Java工程師培訓(xùn)學(xué)院哪里好_太倉JAVA培訓(xùn)